

In this article, we explained two important tips of how to list only today’s files with the help of ls and find commands. Ways to Find Multiple Filenames with Extensions in Linux.Master Linux ‘find’ Command with This 35 Examples.Useful 7 Quirky ‘ls’ Tricks for Linux Users.Master Linux ‘ls’ Command with This 15 Examples.You can get more usage information for ls and find commands in our following series of articles on same. maxdepth 1 -newermt "12-06-2016"įind: I cannot figure out how to interpret '12-06-2016' as a date or timeĪlternatively, use the correct formats below: # find. Important: Use the correct date format as reference in the find command above, once you use a wrong format, you will get an error as the one below: # find. This means that, only files modified on will be considered: # find. t – reference is interpreted directly as a time.m – modification time of the file reference.c – inode status change time of reference.X and Y represent any of the letters below:

-newerXY, this works if timestamp X of the file in question is newer than timestamp Y of the file reference.-maxdepth level is used to specify the level (in terms of sub-directories) below the starting point (current directory in this case) to which the search operation will be carried out.Again, it is possible to use the find command which is practically more flexible and offers plenty of options than ls, for the same purpose as below. You can also list based on size (largest first) using the -S flag: # ls -alS -time-style=+%D | grep 'date +%D'Ģ. In addition, you can sort the resultant list alphabetically by including the -X flag: # ls -alX -time-style=+%D | grep 'date +%D'
