Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
Showing results for 
Search instead for 
Did you mean: 

find command

Regular Advisor

find command

hi guys, just wondering is there a way to use the find command to get date and time as well, because usually we just get the filename which fulfills that criteria such as filesize more than > 1 mb or files that was accessed more than 10 days ago but dont get date and time or the input like we get with ls -l.....
Pete Randall
Outstanding Contributor

Re: find command


find /startdir -size nnnn -atime nnn -exec ll {} \;


Ganesan R
Honored Contributor

Re: find command


Two ways you can do this.

#find /var -size +5000 |xargs ls -al

#find /var -size +5000 -exec ll {} \;
Best wishes,

Jestin John Chacko
Regular Advisor

Re: find command


may be you are asking for the mtime option of find

find -mtime +number of days

you can see more in man find

Dennis Handly
Acclaimed Contributor

Re: find command

If you are going to use "-exec ll", then you either need to exclude directories or add -d:
find /startdir -type f -size nnnn -atime nnn -exec ll {} +
find /startdir -size nnnn -atime nnn -exec ll -d {} +

Note: Use "+" for performance, instead of xargs.