Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recent files in folder

I want to check files which are recently added to the folder in unix environment.

is there any find check

     find -name 'filename' timestamp last 5 mins ??
like image 249
Some Java Guy Avatar asked Feb 08 '11 13:02

Some Java Guy


People also ask

Where are recent files saved?

Quick Access Popup Recent folders and Recent files are taken from the Windows virtual folder Recent items (C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Recent or, using the appdata variable, %appdata%\Microsoft\Windows\Recent).

What is a recent file?

What are Recent Files? Recent Files are files that have been opened or edited in the recent past.

How do I view recent files in Explorer?

Open File Explorer. Click on Quick Access, if that isn't the default, opened location. Look for Recent Files in the lower-right corner. Scroll down to see the last 20 recent files.


2 Answers

To locate files modified less than 5 minutes ago

find -name 'filename'  -mmin -5

From the man page:

   -mmin n
          File's data was last modified n minutes ago.

   -mtime n
          File's data was last modified n*24 hours ago.

-mmin is supported under most recent versions of GNU find.

like image 156
dogbane Avatar answered Oct 25 '22 03:10

dogbane


To find all files modified in the last 24 hours (last full day) in current directory and its sub-directories:

find . -mtime -1 -print

Source

like image 21
Adnan Avatar answered Oct 25 '22 05:10

Adnan