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.
- [LIH] Delete file Anilkumar
- Re: [LIH] Delete file Sandip Bhattacharya
- Re: [LIH] Delete file Binand Raj S.
- Re: [LIH] Delete file Raju Mathur
- Re: [LIH] Delete file RaghuNath L
- [LIH] How to check which kernel we have? Anilkumar
- Re: [LIH] How to check which kernel we hav... Shanker Balan
- Re: [LIH] How to check which kernel we hav... Shridhar Daithankar
- Re: [LIH] How to check which kernel we hav... Mrinal Kalakrishnan
- Re: [LIH] How to check which kernel we hav... Saugata Chakrabarti
- Re: [LIH] How to check which kernel we hav... Suresh Ramasubramanian
- Re: [LIH] How to check which kernel we... Binand Raj S.
- Re: [LIH] How to check which kerne... Suresh Ramasubramanian
