LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2010, 06:15 AM   #1
birla.sunil
LQ Newbie
 
Registered: Oct 2010
Posts: 20

Rep: Reputation: 0
find command help


hi ,

i am using below command can anyone tell whtz wrong with it
find / -newer -10 mtime +30
to see yersterdays modified files
 
Old 10-29-2010, 06:22 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The -newer predicate accepts a file name as argument: it looks for files modified more recently than the specified file.
 
Old 10-29-2010, 06:26 AM   #3
birla.sunil
LQ Newbie
 
Registered: Oct 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
The -newer predicate accepts a file name as argument: it looks for files modified more recently than the specified file.
can u know the correction of thi s command
 
Old 10-29-2010, 07:58 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
If you want to find the files modified in the last 24 hours, try:
Code:
find / -mtime -1
if you want to find the files modified since yesterday midnight:
Code:
find / -daystart -mtime -2
To use the -newer predicate, just touch a temporary file to the date you want to use as threshold, then you will find every file modified at a later time. Example for 28-Oct-2010 13:00:
Code:
touch -t 201010281300 /tmp/dummy
find / -newer /tmp/dummy
Hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Find a file in directories without using find command sikanders Linux - Newbie 14 08-06-2010 08:47 PM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM
Single find command to find multiple files? thok Linux - Newbie 7 01-31-2009 04:45 PM
Using a single "Find" Command to find files bases on multiple criteria roboxooo Linux - Newbie 6 01-15-2009 04:13 AM
can't find my find command! how to replace? dave247 Debian 4 11-19-2008 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration