Quote:
Originally Posted by
DukeNuke2
work with "find" have a look at the manpage and make the options fit your needs... what means "older than 24 hours"? created, modified or last accesed... you can check all of this with the "find" command!
hth,
DN2
------------------------------------------------------------------------I am able to delete the files from the given path, where files are older than 24 hours.
But it is also going inside the directories of the path and deleting the files older than 24 hours.I want just the files to be deleted from that path, without going inside any directory of that path and deleting files from that directory too
find /tmp/test -type f -mtime +0 -exec rm {} \;
For example: if the test directory has one more directory "/test/test2" and files are there in the test2 directory, but if i issue the above command, it will go inside the test2 and delete files...
I dont want this command to go inside the directory and deleting files
Can you troubleshoot and pass the solution.