1.

Solve : LISTING AND MOVING FILES BY AGE?

Answer»

???what command line would I use to LIST FILES in a directory older than 5 days and move them to to ANOTHER named oldfiles (I can move them but cannot COME up with the sytax to list them by date or age)
Thanks,
GaryTry this:

$find . -mtime +5 > newfile

What this command does is: Find, from the root, all of the files MODIFIED more than 5 days ago and redirects it into a file called newfile.

Hope that helps.

J



Discussion

No Comment Found