a new (?) twist on filesystem backups
Greg McGary
gm at lmi-angel.UUCP
Tue Nov 25 03:13:45 AEST 1986
In article <269 at ima.UUCP>, trb at ima.UUCP (Andrew Tannenbaum) writes:
> As we know, cpio likes a list of files on standard input. Problem is,
> people normally use find to generate that list, but it happily crosses
> filesystem boundaries. How to generate a list of files on a filesystem
> for cpio? find | grep -v? No, ncheck!
I added a `-mount' option to our find(1) to prevent it from traversing
mount points. E.g.
find / -mount -print
gets you the root and nothing else.
I also added a `-magic' option for checking magic numbers. You can
specify short or long integers in any radix and also strings. This is
particularly useful for making source distributions from a hierarchy
that is littered with .o's, load-modules, cpio images, and archives
crated by ar(1). E.g.
find /src -magic 0520 -magic 070707 -smagic 070707 \
-smagic "<ar>" -smagic "!<arch>" -print
excludes m68k COFF files, cpio archives, cpio archives with
ascii-headers, plus old and new-style System-V archives. If you wish
to include files with particular magic numbers, `+magic' does so for
integer magic-numbers and `+smagic' does it for string magic-numbers.
If the integer magic-number is a long, append `L' or `l' to the
digits.
I vaguely recall that there was a discussion some months ago about
enhancements to find(1). Unfortunately, I missed. If someone has a
summary of the discussion, please forward it to me.
--
-- Greg McGary {decvax!cca,harvard,mit-eddie}!lmi-angel!gm
--
``Make something of yourself! ... Try a casserole!''
More information about the Comp.unix.wizards
mailing list