Can I back up all the files I work with each day using tar?

Can I back up all the files I work with each day using tar?

Yes you can. Use the find(1) command to generate a list of files that have been modified in the last day and use that as input to the tar(1) command. Let's assume you're in your home directory:

$ mkdir backup
$ tar cvf backup/20061001.tar `find . -type f -mtime -1 -print`

If you run this command multiple times in a day, it could find your previous backups, so you might add a grep(1) filter to remove your backups:

$ tar cvf backup/20061001.tar `find . -type f -mtime -1 -print | grep -v "^./backup/"`

Thanks for the help!!!