10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I need to copy the files to respective directories based on name of the file. My script is something like below
con=$1
for file in `cat $con`
do
file_tmp=$(ls -t1 $path| grep -i $file | head -n 1)
echo $file_tmp
if
then
cp $path$file_tmp $DIR/ap
if
then... (16 Replies)
Discussion started by: Master_Mind
16 Replies
2. Shell Programming and Scripting
Hi,
I have several files containing experiment measurements per hour (hour_1.txt has measurements for first hour, etc..etc..). I have 720 of these files (i.e. up to hour_720.txt) and i want to create 720 directories and in every one of them i want to copy its associative file (e.g.... (4 Replies)
Discussion started by: amarn
4 Replies
3. UNIX for Dummies Questions & Answers
how can i copy those files into other directories have the same name but different in the end
i have files in directory called test:
10_10_asdadfsdfad.txt
10_10_11_asdawqefwkjasd.txt
10_10_11_12_asdafjjhoqwd.txt
i want to put them in exist directory thart i have on my system
i have... (1 Reply)
Discussion started by: t17
1 Replies
4. UNIX for Dummies Questions & Answers
I want to connect to an SFTP server, GET some files, then move those files to a different directory on the SFTP server so I don't try to GET them next time. But there doesn't seem to be a way to move files between directories on the remote server from SFTP. I missing something obvious? And if... (6 Replies)
Discussion started by: cjhancock
6 Replies
5. UNIX for Dummies Questions & Answers
Hello there, I'm a total noob to shell scripting. :)
What I want to do is compare the contents of Folder A and Folder B, and copy any files in Folder A that do not exist in Folder B over to Folder B.
I have gotten so far as:
diff -rq folderA folderB
which returns the names of the files,... (3 Replies)
Discussion started by: raaaaaa
3 Replies
6. UNIX for Dummies Questions & Answers
Hi guys,
I want to copy folder and sub folders only. I don't want the files. If i use cp -r command it will copy entirely with files.
Could any one suggest me.
Thanks in advance (1 Reply)
Discussion started by: karthik82
1 Replies
7. Shell Programming and Scripting
Hi,
My requirement is to have a shell script:
SOURCE_DIR=/usr/logs/restore/ --> Contains multiple subdirectories
TARGET_DIR=/usr/data/logs --> Existing folders which contain similar subdirectories
I want to copy only newer or uniquie files which are present in $SOURCE_DIR and its... (2 Replies)
Discussion started by: sujoy101
2 Replies
8. UNIX for Dummies Questions & Answers
I have a report file that is generated every day by a scheduled process.
Each day the file is written to a directory named .../blah_blah/Y07/MM-DD-YY/reportmmddyy.tab
I want to copy all of this reports to a separate directory without having to do it one by one.
However, if I try
cp... (3 Replies)
Discussion started by: ken2834
3 Replies
9. UNIX for Dummies Questions & Answers
I have two drives (scsi) mounted on one server and I need to copy certain files and directories from one drive to the other. Any suggestions :confused: (4 Replies)
Discussion started by: shorty
4 Replies
10. AIX
I have software on Z drive " I map it " , its about 50 MB , I want to copy the whole directory in to unix server , under some folder ...
What are the steps how Ican perform this ?
I have UNIX user name and password and rights to create files and folders..
Remember I want to copy all the folder... (3 Replies)
Discussion started by: khan1978
3 Replies