Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I locate files by date or time?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Tue Nov 01, 2005 12:36 pm    Post subject: How can I locate files by date or time? Reply with quote

Hello...

Not infrequently, I know when a file was created or modified, but I don't know its name or location. Is there a way to search for all files created within a limited time span?

Thanks...
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Nov 01, 2005 1:13 pm    Post subject: Reply with quote

Use the find command in combination with for example the -mtime flag.
For example if you search a file in your home, with "text" in the filename, that was
modified within the last 10 minutes, type:
Code:

find ~ -name "*text*" -mmin -10


Have fun!
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Tue Nov 01, 2005 2:30 pm    Post subject: Reply with quote

Sleipnir wrote...
Quote:
Use the find command in combination with for example the -mtime flag.
For example if you search a file in your home, with "text" in the filename, that was
modified within the last 10 minutes, type:
Code:

find ~ -name "*text*" -mmin -10


Thanks for that suggestion...

Suppose, though, that I am unaware of the directory in which the file is located... I just want to see all new or modified files (e.g. from the last 30 min)?

Thanks...
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Nov 01, 2005 3:58 pm    Post subject: Reply with quote

So you have to search beginning from the root directory:
Code:

find / -mmin -30

Eahh yeah be aware that this may take a while, because you iterate
through _all_ files on your system...
You should read the manual of the find command. To do so simply type
Code:

man find

there are a lot of fancy and usefull options for this command...
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum