Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any command to display the recently modified/created files?

Which one...?

share|improve this question
up vote 11 down vote accepted

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

find ${1} -type f | xargs stat --format '%Y :%y %n' 2>/dev/null | sort -nr | cut -d: -f2-

See Find command


share|improve this answer
The command is correct. Have you tried it? – Mitch Jan 27 '14 at 11:51
Yeah,it's correct,it just takes some time.I thought -f2- would be incorrect because commands don't generally end with an - – Registered User Jan 27 '14 at 11:56
Nice one! What about ignoring hidden files? – Ionică Bizău Jan 27 '14 at 11:57
You can use -iname. For example, find *.txt file but ignore hidden .txt file such as .vimrc you would -type f \( -iname "*.txt" ! -iname ".*" \). – Mitch Jan 27 '14 at 12:04
@Mitch how to specify to find files in last 2 days? – user13107 May 8 '14 at 2:36

Check stat command:


stat [options] filename ... ...


stat /home/user/Docs/filename.txt

To search for files, use find commands:


find /to/target/directory* -mtime -1

(the switch -mtime n show file's with data last modified n*24 hours ago, for -mtime -1 the files 1 day old will be shown)

find /to/target/directory* -mmin 30

will show files modified in last 30 minutes.

Check for more options under TESTS in the manual pages (use man find in terminal). You can use other switches like -amin n (last accessed n minutes ago), -cmin (file's status was last changed n minutes ago), and others.

share|improve this answer
You should give specific command – Registered User Jan 27 '14 at 11:36
Maybe you could consider either removing the stat part from your answer or giving a specific command. – Registered User Jan 27 '14 at 11:48
stat filename where filename could be your target's absolute or relative path. This will show access, modification, change times among other outputs.. – precise Jan 27 '14 at 11:54
stat will also give you the file's birth time if the filesystem supports that.. – precise Jan 27 '14 at 11:55
The asker wants to see a list of recently changed files.stat gives out properties of a specific file or directory(like when it was modified last time). Therefore this command is not appropriate for this question. – Registered User Jan 27 '14 at 12:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.