Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
It might help if you could post the script, or the relevant parts of it, to show what you have done so far and how. For example how you pick up the new files among all files, do you just compare already-backed-up filelist against current-files list or something?
You could also save information about the files' last modification times and compare them, that way you should get the modified files too. For example "find" can help achieving this.
You can use find's -mtime or -newer with find to determine which files are new or modified either in a given period of time or compared to a reference time. Also look in the tar info manual, Section 5.2. You can use timestamps to perform incremental dumps.
The ls -l command uses the mtime value which is what you want. If you want any change in permissions to cause a file to be backed up then you can use "ls -l --time=ctime".