"find" and {a,c,m}time
Jay M. Libove
root at libove.UUCP
Sun Oct 9 02:02:42 AEST 1988
I use "find (files) | afio (etc...)" to backup my SCO Xenix 286 v2.2.1
filesystem, which is at around 80 megabytes right now. I would like to
be able to do incremental backups, but I'm having a problem...
My manual entry for find(C) (SCO uses bogus manual sections, that should
be find(1) to the real world I think) says:
find pathname-list expression
...
-atime n True if the file has been accessed in n days.
-ctime n True if the file has been changed in n days.
-mtime n True if the file has been modified in n days.
Okay, so "find -?time 3 -print" should find all files ?'d within the
last three days, right? Nope. To wit:
==================================================
[root]/usr/local/bin:(1 ) % ls -lt | head -10
-rwxr-xr-x 1 bin bin 111 Oct 8 09:10 lpq
-rwxr-xr-x 1 root root 34513 Oct 7 09:57 pcomm_input
-rwxr-xr-x 1 root root 180264 Oct 7 09:57 pcomm
-rwxr-xr-x 1 root root 88865 Oct 7 02:32 vn
-rwxr-xr-x 1 root root 12432 Oct 6 12:25 lesskey
-rwxr-xr-x 1 root root 45329 Oct 6 12:25 less
-rwxr-xr-x 1 bin bin 249 Oct 5 19:06 uulck
-rwxr-xr-x 1 bin bin 89 Oct 5 08:18 ckuucp
-rwxr-xr-x 1 bin bin 25775 Oct 4 19:19 psc
[root]/usr/local/bin:(2 ) % find . -mtime 1 -print
./less
./vn
./lesskey
./pcomm
./pcomm_input
[root]/usr/local/bin:(3 ) % find . -mtime 2 -print
./uulck
==================================================
As you can see, -mtime 1 included only those files modified in the day
preceeding, and -mtime 2 included only those files modified in the day
preceeding the day preceeding, _not_ files modified within the last two
days. This obviously makes it difficult to use
% find . -mtime (epoch_days) | afio ...
to back up the filesystem incrementally.
So, is this the correct behaviour for find(1) (oops, pardon me SCO,
find(C)) ?
While I have your attention :-)
Since, correct behaviour or not, this is what I have... does anyone have
Thanks for any suggestions.a suggestion on how to work around this, in
order to do reasonable incremental backups with commands like:
(find appropriate files by date) | afio ...
[ remark: afio is an enhanced cpio ]
Thanks in advance!
Jay Libove ARPA: jl42 at andrew.cmu.edu or libove at cs.cmu.edu
5731 Centre Ave, Apt 3 BITnet: jl42 at andrew or jl42 at drycas
Pittsburgh, PA 15206 UUCP: uunet!nfsun!libove!libove or
(412) 362-8983 UUCP: psuvax1!pitt!darth!libove!libove
--
Jay Libove ARPA: jl42 at andrew.cmu.edu or libove at cs.cmu.edu
5731 Centre Ave, Apt 3 BITnet: jl42 at andrew or jl42 at drycas
Pittsburgh, PA 15206 UUCP: uunet!nfsun!libove!libove or
(412) 362-8983 UUCP: psuvax1!pitt!darth!libove!libove
More information about the Comp.unix.questions
mailing list