Hi,
I am unable to read the file modified some time ago. How to find all files that was modified since a specific time ago in Unix environment?
All suggestions are welcome.
Hi,
I am unable to read the file modified some time ago. How to find all files that was modified since a specific time ago in Unix environment?
All suggestions are welcome.
For obscure historical reasons find mini-language is completely different from all other UNIX commands: it has full-word options rather than single-letter options. For example, instead of a typical Unix-style option -f to match filenames (like in tar -xvf mytar.tar) find uses option -name. Also path to search can consist of multiple starting points, for example
find /usr /bin /sbin /opt -name sar # here we exclude non-relevant directories
The find command is used to locate files on a Unix or Linux system. Find will search any set of directories you specify for files that match the supplied search criteria. You can search for files by name, owner, group, type, permissions, date, and other criteria. Go through the following thread: How to find files modified in Linux. I hope it helps.
Try using st_mtime instead of st_ctime. Use the ls command on the file:
ls -l file # show mtime
ls -lc file # show ctime
ls -lu file # show atime
Bookmarks