10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to copy the files to respective directories based on name of the file. My script is something like below
for file in `cat $con`
file_tmp=$(ls -t1 $path| grep -i $file | head -n 1)
cp $path$file_tmp $DIR/ap
then... (16 Replies)
Discussion started by: Master_Mind
2. Shell Programming and Scripting
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Discussion started by: consultant
3. Shell Programming and Scripting
how can i move "dataName".sql.gz into a folder called 'database' and then move "$fileName".tar.gz * .htaccess into a folder called 'www' with the entire gzipped file being "$fileName".tar.gz? Is this doable or overly complex.
-... (5 Replies)
Discussion started by: wyclef
4. Shell Programming and Scripting
I am looking for the syntax to provide a timestamped log_file in expect.
Basically I want the equivalent of:
/outputs/`date +%d%m%y`/session`date +%H%M`
But scripted in expect so it can be handed over to the logfile function.
I have tried playing around with the timestamp... (1 Reply)
Discussion started by: krypton
I have a tar file that contains a number of files that are stored in different directories.
If I extract this tar file with -xvf , the directories get created.
Is there a way to extract all of the files into one directory without creating the directories stored in the tar file. (9 Replies)
Discussion started by: gkb
6. 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:
i want to put them in exist directory thart i have on my system
i have... (1 Reply)
Discussion started by: t17
7. Shell Programming and Scripting
I'm trying to copy all files within a specified directory to another location based on a find filter of mtime -1 (Solaris OS). The issue that I'm having is that in the destination directory, I want to retain the source directory structure while copying over only the files that have... (4 Replies)
Discussion started by: hunter55
8. UNIX for Dummies Questions & Answers
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
9. Shell Programming and Scripting
I have a security system that FTPs the camera files to my machine, however I want to sort the pictures (taken every 30s) into directories by hour.
Every picture uses the following file format.
yymmddhhmmsstt.jpg (where tt is the milliseconds)
I am thinking the for loop is best
for file... (11 Replies)
Discussion started by: Kiint
10. 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