HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
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

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.