Information Technology Reference
In-Depth Information
To make the find command even more powerful (and harder to determine),
these command-line arguments can be combined into complex expressions
using the and ( -a ) and the or ( -o ) operators. For example, the expression
-type p -a -user dla will cause find to list only plain (ordinary) files
owned by the user account dla .
The following listing shows how the find command is used to generate a list
of files. The first find command lists all files under the /export/home/sarah
directory, which is used to generate the sarah.cpio archive. The second cpio
command lists the files under /etc that have been modified in the last two
days. The same command is repeated and used as the input cpio command
to create the etc.cpio archive.
# find /export/home/ambro | cpio -o -O ambro.cpio
544 blocks
# find /etc -mtime -2
/etc/saf/zsmon/_pmpipe
/etc/saf/_sacpipe
/etc/mnttab
/etc/utmppipe
# find /etc/ -mtime -2 | cpio -o -O etc.cpio
16 blocks
#
Summary
A backup strategy typically consists of a periodic full backup, supplemented
by a series of incremental backups. Full backups make it easy to restore entire
systems, but take a lot of time and tape. Incremental backups only back up
what has been changed since the last backup. Combining the two types of
backups into a strategy uses less time and less tape.
The ufsdump and ufsrestore commands can be used to perform
backup/restore operations on entire UFS file systems (full backup) or select-
ed files/directories (incremental backups). Backups should only be per-
formed on unmounted UFS file systems. To back up a mounted file system,
use the fssnap command to take a snapshot of the mounted file system, and
then back up the snapshot.
The tar and cpio commands can be used to create archives of files and direc-
tories that can be restored on other systems. The find command can be used
to select the files/directories to place in the archive.
Search WWH ::




Custom Search