10-24-2016
My way forward to complete this is indeed to actually go in to the Source folder (which does exist) and then do a loop listing the objects in that folder.... and cp and echo what i am coying... the Source Target directory does exist....
I will have to put in return code checks to make sure the change directory works, and then i can put one in for the copy as well.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
So tried:
cp -r -p test1/ user@machine:///srv/www/vhosts/domain.co.uk/httpdocs/backup/
but this didn't work either :(
Anyone able to help with this?
Many thanks
Mr M (3 Replies)
Discussion started by: misterm
3 Replies
2. Shell Programming and Scripting
Hi everyone,
I'm stuck with this scenario where our system creates files every night and puts them in several folders according from whom it came from.
I have managed to create a script which will list the folders in one column and the files that are in them in another column, now my problem... (6 Replies)
Discussion started by: kumaran21
6 Replies
3. Shell Programming and Scripting
i have users home directories in /home
all the users have some files starting with character e
and i want to copy all these files in a folder in my (root) home
using a script
i tried the script
for i in m5
do
cd m5
cp e1* /home/pc/exam
cd ..
done
but get these... (3 Replies)
Discussion started by: pcrana
3 Replies
4. Shell Programming and Scripting
Hi..
I have 2 servers with linux suse10.
I made a mistake and on one of the servers changed with chmod the permission of root in directory /.
In the other servers the permissions are correct
Please i need a script, to change the permissions of one server 1, using the same permission of the... (11 Replies)
Discussion started by: ave-phoenix
11 Replies
5. Windows & DOS: Issues & Discussions
I have files existing with same names in the folders with date as display below
c:\2010-09-10 <==== folder
arr1.jpg
arr2.jpg
arr3.jpg
arr4.jpg
c:\2010-09-09 <==== folder
arr1.jpg
arr2.jpg
c:\2010-09-08 <==== folder
arr2.jpg
arr3.jpg
arr4.jpg
... (5 Replies)
Discussion started by: jville
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I just started to learn shell progamming and just can't get my head around the following problem.
I need to do the following:
I have a folder which contains 100+ subfolders. Inside these subfolders there is one folder named 'Morph' and several jpg's.
I need to copy all the files into... (4 Replies)
Discussion started by: M474746
4 Replies
7. Shell Programming and Scripting
Folks,
I am hopeful that you may be able to help me out with writing a script that can be run nightly (as cron?) to loop through all subfolders within the "/media" directory, delete all of the files in each of them, and then copy in all of the files from the "/home//sansa" directory to each of... (6 Replies)
Discussion started by: acraig
6 Replies
8. UNIX for Dummies Questions & Answers
Hello again,
A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x.
I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies
9. Shell Programming and Scripting
Hi,
I need help in shell scripting. If someone can help me, that would be great!
Problem. I want Linux Script to compare two folders and copy missing files.
Description.
I have two directories
/dir1
/dir2
I need to copy all distinct/new/unique/missing files from /dir1 and that... (1 Reply)
Discussion started by: S.Praveen Kumar
1 Replies
10. HP-UX
Dear All,
I will appreciate any help received. Our system is running on hpux v1
My problem is as follows:
We have many customer folders with name fd000100, fd000101 and so on
e.g.
(Testrun)(testsqa):/>ll /TESTrun/fd000100
total 48
drwxrwx--- 2 fq000100 test 96 Jun 27 2004... (17 Replies)
Discussion started by: mhbd
17 Replies
SETFILE(1) BSD General Commands Manual SETFILE(1)
NAME
/usr/bin/SetFile -- set attributes of files and directories
SYNOPSIS
/usr/bin/SetFile [-P] [-a attributes] [-c creator] [-d date] [-m date] [-t type] file ...
DESCRIPTION
/usr/bin/SetFile is a tool to set the file attributes on files in an HFS+ directory. It attempts to be similar to the setfile command in MPW.
It can apply rules to more than one file with the options applying to all files listed.
Flags:
-P Acts on a symlink file instead on the file the symlink resolves to.
-a attributes Sets the file attributes bits where attributes is a string of case sensitive letters. Each letter corresponds to a file
attribute: an uppercase letter indicates that the attribute bit is set (1), a lowercase letter indicates that it is not (0).
Note: attributes not specified remain unchanged.
A | a Alias file
B | b Has bundle
C | c Custom icon (allowed on folders)
D | d Located on the desktop (allowed on folders)
E | e Extension is hidden (allowed on folders)
I | i Inited - Finder is aware of this file and has given it a location in a window. (allowed on folders)
L | l Locked
M | m Shared (can run multiple times)
N | n File has no INIT resource
S | s System file (name locked)
T | t "Stationery Pad" file
V | v Invisible (allowed on folders)
Z | z Busy (allowed on folders)
-c creator Specifies the file's creator, where creator can be a string of four MacRoman characters, an empty string ('') designating a
null creator, or a binary, decimal, octal, or hexadecimal number in standard notation (e.g. 0x52486368).
-d date Sets the creation date, where date is a string of the form: "mm/dd/[yy]yy [hh:mm:[:ss] [AM | PM]]" Notes: Enclose the string
in quotation marks if it contains spaces. The date must be in the Unix epoch, that is, between 1/1/1970 and 1/18/2038. If the
year is provided as a two-digit year, it is assumed to be in the 21st century and must be from 00 (2000) through 38 (2038).
-m date Sets the modification date where date is a string of the form in -d above. (mm/dd/[yy]yy [hh:mm:[:ss] [AM | PM]])
-t type Sets the file type, where type can be a string of four MacRoman characters, an empty string ('') designating a null type, or a
binary, decimal, octal, or hexadecimal number in standard notation (e.g. 0x55455955).
RETURN VALUES
0 attributes set
1 syntax error
2 any other error
SEE ALSO
GetFileInfo(1)
EXAMPLES
This command line sets the modification date of "myFile":
SetFile -m "8/4/2001 16:13" myFile
Mac OS X January 4, 2009 Mac OS X