On Thu, 9 Dec 1999, Ian Douglas wrote:

:>Can anyone help me out with a script (sh or Perl, doesn't matter) that will
:>recursively go through any directories I specify on the command line to move
:>old files to a new directory while retaining the original directory path?
:>
...

:>I don't mind tweaking the script to force a date to compare against (say, to
:>move any files older than September 30, 1999) or the destination location.
:>
:>I'm just not that skilled at shell scripts and just spent two days manually
:>traversing directories moving old files to an archive directory and figure
:>there's GOTTA be an easier way.
:>

There surely is. This can be done very easily with "find". Something like:
======
        find . -mtime +100 -exec mv {} /old/ \;
======
would do the trick. Surely, TIMTOWTDI, but do I get a prize for a shortest
script?.-)

cu

        Denis

-----------------------------------------------------------
Denis Havlik  |||   http://www.ap.univie.ac.at/users/havlik
             (@ @)  [EMAIL PROTECTED]       
---------oOO--(_)--OOo-------------------------------------

Reply via email to