hi guys
How can I view all the files used today or last month in a file system?
Thank you all
hi guys
How can I view all the files used today or last month in a file system?
Thank you all
When you say used, how do you mean? The file information records three timestamps. Access, change & modification. The command stat and various flags can be used to display any or all of these and the manual page describes what each one is for. It might seem odd, but a change and a modification are not the same.
The flags are as follows:-
I think:-
ls -l $filename
Does that help?
What format do you need the output as? Sometimes the time since the Epoch (1/1/1970 00:00:00) can be useful to do calculations with.
If you just need to find files older / newer than a known time, perhaps you could use touch with a timestamp to create a reference file and then the -newer /tmp/ref_file
or ! -newer /tmp/ref_file
construction of a find command.
Do either of these approaches help?
Robin