Command
Gzip
gzip –d file = gunzip
gunzip –c file = zcat
gzip –dc file =gunzip –c file = zcat
Tar
compress
--> tar -cvf /dev/rmt/0mn X1 X2 X3
--> tar –cvf file.tar X1 X2 X3|
Extract
--> tar -xvf /dev/rmt/0mn
--> tar –xvf file.tar
Read
--> tar -tvf /dev/rmt/0mn
--> tar –tvf file.tar
Tar to another machine
--> remsh <name> “(cd /dir; tar cf - ./.passwd )” | tar xf -
Tar&gzip
compress
--> tar cvf – file|gzip > file.tar.gz
--> tar –cvf file.tar X1 X2 X3|gzip file.tar.gz
Extract
--> gunzip –q < file.tar.gz | tar xvf –
Read
--> gunzip –q < file.tar.gz | tar tvf –
--> gzip –qdc < file.tar.gz | tar tvf -
Cpio
Compress ( relative path)
--> find . –depth –print |cpio –ocvBmdu > /dev/rmt/0mn
--> find . –depth –print |cpio –ocvBmdu > file.cpio
Extract ( relative path )
--> cpio –icvBf < /dev/rmt/0mn (# f=force)
--> cpio –icvBf < file.cpio (# f=force)
Read
--> cpio –icvtB < /dev/rmt/0mn
--> cpio –icvtB < file.cpio
Cpio to another machine
--> remsh <name> “(cd /dir;find –dept –print d|cpio –icvBmdu)” |cpio –ocvBmdu
Disk dump
dd if=/var/tmp/lif1 of=/dev/rmt/0mn obs=2k
0 comments:
Post a Comment