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?
>
> ie:
>
> /home/oldfile1
> /home/olddir/oldfile2
> /home/olddir/oldfile3
>
> running the script as "script /home" will move the files to /archive so it
> looks like this:
>
> /archive/oldfile1
> /archive/olddir/oldfile2
> /archive/olddir/oldfile3
>
> 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.
>
> Thanks for any assistance,
> ---
> Ian Douglas, Wild Web Services
> http://www.wildwebservices.com
> ph: 613-253-3147
> fx: 613-253-1029
> pager: http://wildwebservices.com/pager.html
Forgive me for being old-fashioned, but wouldn't a tar command work for this?
Civileme