Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find old files ?

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
Sorry guys but I have asked this question before and am still trying to find a solution.
How do I find files older than 2 days and remove them ?
The problem with the find command is that it looks across directories and I need to look in specific directories only.
The -prune option does not work for me either.
I need this kind of solution ;
ls -l mydir | find -mtime +3
OR
is there a command to display file date info like eg. aclget

Any bright ideas ?
Thanks
Steve
 
This might be a possible solution:

for i in directory1 directory2 directory3...
do
find $i -mtime +3 -print
done
 
You can have the file details using [tt]istat filename[/tt]...

I hope it works...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top