Delete files for a particular changed date recursively?
Hi there!
newbie here needs help. your help will be much appreciated. How do I delete files that have a particular changed dated recursively? What is the command? can i use rm? Thanks in advance Regards |
you can probably write a very simple script using "find" and "rm"
|
Hi Demonbane,
i have tried going through the man pages for FIND, but i still can't figure out to use it to find files that are last changed on a particular date. And after i am able to get a list of the files, how do i pipe it to RM to remove it? Sorry, i am really not familiar with this. Regards |
Well for example if the files were modified 3 days ago you can probably use something like this:
Code:
find . -mtime 3 -exec rm -i \{\} \; |
Quote:
|
daysago.php, daysago.sh
The following PHP script kinda does the trick
Code:
#!/usr/bin/php Code:
#!/bin/bash |
All times are GMT -5. The time now is 12:18 PM. |