[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

Re: [ba-unrev-talk] Question about backing up

On Fri, 30 Nov 2001, Henry K van Eyken wrote:    (01)

> Does anyone know of a utility that will scan one's harddisk for files
> with a certain date or later and place copies of these in a single
> directory (from which one can create a CD-update to previously backed-up
> files)? For Windows; for Linux.    (02)

On UNIX, to create a backup archive called backup.tar:    (03)

  tar cvf backup.tar `find sourcedir -mtime -n -print`    (04)

where sourcedir is the directory you want to back up and n is the number
of days ago the files were last modified.  So, for example, to back up all
of the files in /usr/local/httpd that were modified in the past week:    (05)

  tar cvf backup.tar `find /usr/local/httpd -mtime -7 -print`    (06)

Ah, UNIX. :-)    (07)

-Eugene    (08)

+=== Eugene Eric Kim ===== eekim@eekim.com ===== http://www.eekim.com/ ===+
|       "Writer's block is a fancy term made up by whiners so they        |
+=====  can have an excuse to drink alcohol."  --Steve Martin  ===========+    (09)