1751701 Members
4821 Online
108781 Solutions
New Discussion

Re: listing files

 
rajesh73
Super Advisor

listing files

We need to list the older then 5 days files

 

path -/home , under /home totally 10 user folder we have.

 

we need to list  each user directory files older then 10 days, output is text format, after that we the txt to mail.

 

 

 

1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: listing files

>We need to list the older then 5 days files

 

$ find /home -mtime +5 > file.list

 

Lists files that were modified more than 5 days ago.  Then just mail file.list:

mailx -s "files modified more then 5 days ago" foo@bar.com < file.list

 

>we need to list  each user directory files older then 10 days

 

Did you want 5 or 10?