Tuesday, October 2, 2007

tar tricks

Copy whole directory:
tar cvf - dir1 | (cd dir2; tar xf -)

e.g.:

cd /mnt/home_old (mounted with nfs)

tar cvf - pdespres | (cd /home; tar xf -)

Split files to fit on DVDs:

tar c -M -L 4396000 --file=archive_part1.tar files_to_archive

Subsequent files are create by typing:
n archive_part2.tar
when prompted

No comments: