Re: rm - Arguments too long

From: ben (ben_m_f_at_yahoo.co.uk)
Date: 04/25/03


Date: 25 Apr 2003 06:56:42 -0700


> |It works for find . -name "something*" | xargs rm -f.
> |Would anyone tell me how to specify day-old file.
> |Let's say, I want to delete 3 days old file, how do I combine together
> |with "find . -name "something*" | xargs rm -f" command.
>
> See the "time" options in the find man page.

Another way is to create a file with touch (discussed earlier) with
arguements to make its mtime 3 days old. Then use find . ! -newer
my3dayoldfile

This will pull out every file _not_ newer that 3 days.

Ben