Need to create a script to move files from one directory to another
I am running Sun OS 5.8, OpenWindows 6.4.1 on a Sun Sparc Ultra station. The script I'm trying to create involves moving files that are more then thirty days old from one directory to another on acoording to a set time scedule. What shell commands would i need to try to get this to work?
|
find, mv and crontab.
|
I already know those commands, I needed to know the rest of the path of the command for lets say a dir called 555555 that I was trying to move.
|
Something like this?
#to show you what you would actually move (doesn't do anything) find /path/to/directory -ctime +30 -exec ls -l {} \; #to actually move the files find /path/to/directory -ctime +30 -exec mv {} /path/to/new/directory \: |
Quote:
|
All times are GMT -5. The time now is 06:38 AM. |