October 2000
Intermediate to advanced
1152 pages
26h 41m
English
Backing up files is a good thing, but backups are like insurance policies. When it is time for them to pay up, you want it all, and you want it now! To get the files, you must restore them. Fortunately, it is not difficult to restore files with either tar or cpio. The following command restores the file /home/alana/bethany.txt from the current archive in the drive:
$ tar -xpf /dev/rmt0 /home/alana/bethany.txt $ cpio -im `*bethany.txt` < /dev/rmt0
The -p in tar and the -m in cpio ensure that all of the file attributes are restored along with the file. By the way, when you restore directories with cpio, the -d option creates subdirectories. The tar command creates subdirectories automatically.
Read now
Unlock full access