« Back to File systems: Frequently Asked Questions

How to find when the last modification happened in a directory

Use the du command to scan a directory and find when the last modification was made. The related modification time will be displayed when using du with the --time option.

# du -sh --time /var
1.2G	2024-06-01 21:45	/var

The time option will show the last modification time of a file or subdirectory within the directory that was specified.

Learn more about du

This article uses the du command to achieve its tasks. For this popular tool there is a cheat sheet available!

» Mastering the tool: du

du cheat sheet

Other questions related to Linux file systems


Is the described answer not working or incorrect, got another tip or question? Share your thoughts!