View previous topic :: View next topic |
Author |
Message |
cgmd Veteran
Joined: 17 Feb 2005 Posts: 1585 Location: Louisiana
|
Posted: Tue Nov 01, 2005 12:36 pm Post subject: How can I locate files by date or time? |
|
|
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 |
|
|
Sleipnir Guru
Joined: 20 Sep 2005 Posts: 372 Location: Germany
|
Posted: Tue Nov 01, 2005 1:13 pm Post subject: |
|
|
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 |
|
|
cgmd Veteran
Joined: 17 Feb 2005 Posts: 1585 Location: Louisiana
|
Posted: Tue Nov 01, 2005 2:30 pm Post subject: |
|
|
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 |
|
|
Sleipnir Guru
Joined: 20 Sep 2005 Posts: 372 Location: Germany
|
Posted: Tue Nov 01, 2005 3:58 pm Post subject: |
|
|
So you have to search beginning from the root directory:
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
there are a lot of fancy and usefull options for this command... _________________ A)bort, R)etry, I)nfluence with large hammer. |
|
Back to top |
|
|
|