![]() ![]() ![]() Where: find is the Unix command line tool for finding files (and more) /directory/path/ is the directory path where to look for files that have been modified. This isn’t as efficient as simply adding the -ls argument to find, as it then does an "ls" for each file matched, but it does give you more control over the output. To find the files that have been changed (with the files data modification time older than) in the last N days from a directory and subdirectories, use: find /directory/path/ -mtime -N -ls. daystart -ctime 4 -type f` do ls -l $f done To do it a different format you could do as in the following example, using ls to get the date and time of modification: for f in `find. The above lists the find output in `ls -dils` format. It needs to be put at the end after the other arguments otherwise it’ll return more than just the files specified by the search criteria. īy adding the "-ls flag" find will also show the filesizes etc as shown in the example output below. The example below shows the output of the current working directory which contains some Linux ISO images and their md5sum files: $ find. The find command simply outputs the list of the filenames, with absolute paths. To find all the files that were modified two days ago, you would do this: find. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |