Linux / UNIX: Displaying Today's Files Only

Linux / UNIX: Displaying Today's Files Only

To display only files that were created or modified today in a Unix or Linux system, you can use the find command with the -ctime option.

For example, to display all files in the current directory that were created or modified today, you can use the following command:

find . -ctime 0
Source‮ww:‬w.lautturi.com

This will search for files in the current directory (indicated by the .) that have a "change time" of 0, which means they were either created or modified today.

You can also use the -mtime option to search for files based on their "modification time" instead of their "change time". This can be useful if you want to find files that were modified today, but not necessarily created today.

For example, to display all files in the current directory that were modified today, you can use the following command:

find . -mtime 0

You can also use the -newer option to search for files that were modified more recently than a specific file.

For example, to display all files in the current directory that were modified more recently than a file named reference, you can use the following command:

find . -newer reference

You can use these options in combination with other find options and filters to narrow your search and find the specific files you are looking for. For more information about the find command and its options, you can refer to the find man page or search online for tutorials and examples.

Created Time:2017-10-29 22:08:56  Author:lautturi