Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-19-2008, 01:26 AM   #1
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
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, 06:44 AM   #2
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:

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 06:45 AM.
Old 07-19-2008, 07:56 AM   #3
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
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?


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

All times are GMT -5. The time now is 07:44 PM.

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