Anilkumar forced the electrons to say:
> I wish to delete all files in a directory which are
> created before 3 days using crontab. How to do this.

Linux (for that matter, I think all Unixen) do not keep track of file
creation time. What you want is file modification time, or mtime. Put
this command in your crontab:

find /path/to/dir -mtime 3 | xargs rm

Warning: test it out! change the rm to echo or something and verify that
it is indeed finding the right files.

Binand


----------------------------------------------
LIH is all for free speech.  But it was created
for a purpose.  Violations of the rules of
this list will result in stern action.

Reply via email to