in reply to (jcwren) RE: Deleting files over 2 weeks old?
in thread Deleting files over 2 weeks old?
The problem, of course, is that this was run as root from the root directory. My friend got paged out of a movie when /some/path/name turned out to be invalid. You can imagine what happened :)cd /some/path/name find . -mtime +30 -print | xargs rm
The other problem (and I haven't tested this, to be honest) is that the above code will not get rid of filenames with spaces. Of course, that's pretty obscure, so I doubt it would come up.
|
|---|