Share your knowledge at the LQ Wiki.
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 02-12-2008, 03:01 PM   #1
Registered: Nov 2006
Posts: 136

Rep: Reputation: 15
Question on updated files

I have a backup script I run on a Fedora Core 6 server and I just had a quick question. Is there any easy way for me to check on any files/directories on the server (that I back up) that have changed or are newer than the ones I currently have backed up and tared onto an external drive?

i know I could just go throug and do "ls -l" but there are thousands or more files i would have to look at then. So is there a way to do this or to look for files newer than a certain date?

thanks for the help.

Last edited by crazy8; 02-12-2008 at 03:20 PM.
Old 02-12-2008, 05:03 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
What/how do you back-up? The easiest option is to use rsync.

Old 02-12-2008, 05:31 PM   #3
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 168Reputation: 168
I like rsync as well. But as far as tools that do diff'ing or age checking.
- If you're using cp, have a look in the man page for the -u or --update option;
- If you're using tar, it also has the -u / --update option;
- If you want to compare two hierarchies, you can use diff -qr /path1 /path2;

Also, for checking the age of a file, have a look at the man page for find and see if the mtime option will do what you want. For example, to see files modified more that 2 days ago under /tmp:
find /tmp -type f -mtime +2


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
Updated system configuration files when using YUM? MarkEHansen Linux - General 5 03-30-2007 12:05 AM
find the latest updated files ubuntu_amateur Linux - Newbie 4 11-02-2006 11:11 AM
APT sources.lists updated files lostdata Linux - Newbie 4 08-22-2005 08:32 PM
getting updated files without up2date/yum redrush Fedora 1 09-28-2004 05:42 AM
How are shadow files updated? bleistein Linux - Security 1 08-01-2003 12:53 PM > Forums > Linux Forums > Linux - Newbie

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

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