Results 1 to 6 of 6
|
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
03-06-2007 #1Banned
- Join Date
- Dec 2002
- Location
- Texas
- Posts
- 242
Find all files modified in a date range
I normally use "find /path -mtime x" when looking for files
modified in various 24 hours periods in the past. But what
if I'm wanting to find all files between date X and Y though?
Let's say, for example, all files modified in 2006... what's the
most logical way to script getting a list of those files?
-
03-06-2007 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
- Posts
- 1,465
Hi.
There's an example for that task in the page below ... cheers, drl
http://amitsharma.linuxbloggers.com/how_to_find.htmWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
-
03-06-2007 #3Banned
- Join Date
- Dec 2002
- Location
- Texas
- Posts
- 242
touch temp -t 200604141130
touch ntemp -t 200604261630
find /data/ -cnewer temp -and ! -cnewer ntemp
Excellent! I would never have come upon that.
Thanks!
-
03-06-2007 #4Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
- Posts
- 1,465
Hi.
Yes, it's creative. He has a lot of good information on that page ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
-
03-07-2007 #5Linux User
- Join Date
- Aug 2006
- Posts
- 458
try this
Code:find . -mtime +$end -mtime -$start
-
10-12-2009 #6Just Joined!
- Join Date
- Oct 2009
- Posts
- 1
finding files by date
# touch -t 200901010000.01 first
# touch -t 200912312359.59 last
find /var/ftp/pub/inspection_pics/ -type f -name '*.jpg' -newer first ! -newer last -exec ls -s {} \; -print > output.txt


