Reputation: 1
I want to list the file from linux directory with some file filter and modification time before 2 days, but thing is list also should give the result in the sorted way .. oldest file first .
kindly help me with this .
thank you .
Upvotes: 0
Views: 34
Reputation: 21
In this command, I find sample files in directory_name without recursive search (-maxdepth 1), print time in Unix-format (for easy sorting) and sort it.
find directory_name -maxdepth 1 -type f -mtime +2 -printf '%T@\t%p\n'|sort -n
Upvotes: 1