Results 1 to 6 of 6
|
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
12-16-2004 #1Just Joined!
- Join Date
- Dec 2004
- Posts
- 4
Delete FIles older than a Set date or number of hours
I am trying to delete fines on a remote server that has become very full
I am new to linux but this task has been lumpe with me
Have been told i have to mix find and rm so would it be some thing like this ?
to remove more than 24 hour old files. With comfirm
find / Desktop/ -mtime +24 rm -i
i just have no idea really but an trying to make this work
-
12-16-2004 #2
I think would be something like
although I would look around the man pages of find and rmCode:find / Desktop/ -mtime 1 | rm -i
-
12-16-2004 #3Just Joined!
- Join Date
- Dec 2004
- Posts
- 4
No that don t seem to do it
$ find / Desktop/ -mtime 1 | rm -i
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
$ find / Desktop/ -mtime 1 | rm [-i]
rm: [-i]: No such file or directory
$ rm - i
rm: -: No such file or directory
rm: i: No such file or directory
$ rm -i
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
-
12-16-2004 #4Just Joined!
- Join Date
- Dec 2004
- Posts
- 4
rm -i < `find home/ -mtime 24`
no
find home/ -delete -mtime +24
no
rm -i > `find / home/ -mtime +24`
-
12-17-2004 #5Just Joined!
- Join Date
- Dec 2004
- Posts
- 4
now was also thinking
But that dont work either
find / -name *.old.* -print > /tmp/delete_files.txt
-
12-17-2004 #6Just Joined!
- Join Date
- Dec 2004
- Posts
- 12
Try
You might want to tryCode:find / -name *.old.* -mtime 1 -exec rm {} \;
firstCode:find / -name *.old.* -mtime 1 -exec ls -l {} \;

Cheers
Spook


Reply With Quote