LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-19-2008, 12:26 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
diff file


I would like to compare files in a directory , but if I want to only compare the files that are created within 30 minutes , can advise what can i do ? thx
 
Old 07-19-2008, 05:44 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
The find command can select files based on time with the -cmin, -amin and -mmin options. For example, if wanted to see all files in the current directory created in the last 30 minutes, you could:

Code:
find . -mmin -30
So I am guessing you want to combine this with the diff command in some way. But I can't figure out precisely what you are trying to do. If you can clarify this a bit I might be able to give you a more specific command sequence. Also note that you can add many other qualifers to the find command such as file type (regular, directory, etc), names (including wildcards), etc.

(For future reference, note that for periods measured in days rather than minutes you can use the -ctime, -atime, and -mtime options.)

Last edited by blackhole54; 07-19-2008 at 05:45 AM.
 
Old 07-19-2008, 06:56 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
ust, your original post is very vague.

Please explain what you want in more detail.

What sort of files are they - images, text, source code, application data files?

What sort of comparison do you want to do - just to see if files are different, or do you want to see what the differences are?

What if you have 10 files in the last 30 minutes - which files should you compare to which other files?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apply diff to a file powah Linux - Newbie 1 03-07-2006 02:00 PM
Dual Boot diff Hard Disk diff OS on Suse 9.1 wilhem Linux - Newbie 1 08-13-2004 06:06 PM
What is *.diff file? carboncopy Slackware 1 05-19-2004 10:26 AM
DIFF (or other file comparison) ciscokid1967 Linux - General 1 12-11-2003 02:13 PM
I have a patch (diff file). What now? Gurduloo Linux - Newbie 2 05-27-2003 02:20 PM

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

All times are GMT -5. The time now is 01:08 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration