|
Question 1:
How to make a script that moves all files with a keyword on it to another folder and lets me know how many files it moved with that keyword? Answer 1: Code: #/bin/ksh -x
Note:
or Code: num=0
or find / -name "*keyword*" -print -exec mv {} /target/dir
\;
Question 2: Shell script for moving all the file from the same folder How to write a shell script which basically moves all the files from one folder say folder x to folder y and once they are moved to folder y a datetimestamp should be attached to there name for example:
Answer 2: Code: dir_x=/path/to/directory_x
|
|
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|