Results 1 to 8 of 8
-
04-13-2005, 08:46 PM #1Junior Guru Wannabe
- Join Date
- Apr 2004
- Posts
- 44
How to list all files/directories that are newly modified?
Hey guys,
What is the shell command (linux) to list all files and subdirectories that are newly modified, or modified after a certain date?
I can't seem to figure it out.
Thanks!
- Ticky.
-
04-13-2005, 11:07 PM #2Junior Guru Wannabe
- Join Date
- Oct 2003
- Location
- New Jersey
- Posts
- 32
find /path/to/dir -mtime 1
Will find all files in /path/to/dir with modification times within the last 24 hours ( 1 = 24 hours)
find /path/to/dir -mmin 1
will find all files in /path/to/dir with modification times within the last 1 minute
for more control see
man find
note -amin, -atime, -cmin, -ctime, -mmin, -mtime, -newerCybersalad.net
A substance almost but
not quite utterly unlike salad
-
04-13-2005, 11:14 PM #3Web Hosting Master
- Join Date
- Apr 2003
- Location
- San Jose, CA.
- Posts
- 1,624
too slow :p
-
04-13-2005, 11:24 PM #4Web Hosting Master
- Join Date
- Apr 2003
- Location
- San Jose, CA.
- Posts
- 1,624
Originally posted by salad
find /path/to/dir -mmin 1
will find all files in /path/to/dir with modification times within the last 1 minute
Actually.. that would only find files modified exactly 1 minute in the future. ?
find /path/to/dir -mmin -1
will find all files in /path/to/dir with modifiication times within the last 1 minute.
-
04-14-2005, 06:29 AM #5Junior Guru Wannabe
- Join Date
- Oct 2003
- Location
- New Jersey
- Posts
- 32
yer right - I gave bad info -
within the last minute
find /path/to/dir -mmin -1
exactly a minute ago
find /path/to/dir -mmin 1
more than a minute ago
find /path/to/dir mmin +1Cybersalad.net
A substance almost but
not quite utterly unlike salad
-
04-14-2005, 07:29 AM #6Junior Guru Wannabe
- Join Date
- Mar 2005
- Location
- Cardiff, Wales, UK
- Posts
- 46
you can also use the -type argument to specifiy just files (f) or just directories (d)
fine -type f -mmin -1 // find just files modified in the last minuteJonathan Wright (Technical Director, JAB Web Solutions Limited).
UK Hosting and Reseller Hosting from JAB Web Solutions
-
04-14-2005, 07:35 AM #7Web Hosting Master
- Join Date
- Apr 2003
- Location
- San Jose, CA.
- Posts
- 1,624
Yeah but he did say he wanted it to find both, "What is the shell command (linux) to list all files and subdirectories "
-
04-14-2005, 09:09 AM #8Junior Guru Wannabe
- Join Date
- Mar 2005
- Location
- Cardiff, Wales, UK
- Posts
- 46
yeah i know
I just thought I'd pass on these words of wisdom I find them most useful when working my way around linuxJonathan Wright (Technical Director, JAB Web Solutions Limited).
UK Hosting and Reseller Hosting from JAB Web Solutions