資源描述:
《solaris下壓縮解壓縮命令詳解(compression and decompression command under solaris)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、solaris下壓縮解壓縮命令詳解(CompressionanddecompressioncommandunderSolaris)CompressionanddecompressioncommandunderSOLARIS1)zipcommandZip-rmyfile.zipinsideAllfilesandfoldersinthecurrentdirectoryarecompressedintomyfile.zipfiles.----rrepresentsrecursivelycompressingallfilesinsubdirectories.Zip-dmyfile.zipsmart.t
2、xtDeletethesmart.txtfileinthecompressedfileZip-mmyfile.zip./rpm_info.txtAddrpm_info.txtfilestothemyfile.zipinthecompressedfileTouseziptocompressfiles,typethefollowingcommandundertheshellpromptZip-rfilename.zipfilesdir----filename.zipstandsforthefileyoucreated,andfilesdirstandsforthedirectorywhereyou
3、wanttoputthenewzipfile.The-roptionspecifiesthatyouwanttorecursively(recursively)includeallthefilesincludedinthefilesdirdirectory.Youcanalsousezipcommandstoprocessmultiplefilesanddirectoriesatthesametime,bylistingthemonebyoneandspacingthemwithspaces:Zip-rfilename.zipfile1File2file3/usr/work/schoolThi
4、scommandcompressesthecontentsoffile1,File2,file3,andthecontentsofthe/usr/work/schooldirectory(assumingthedirectoryexists),andthenputsthemintothefilename.zipfile.-detailedcommandmanZip2)unzipcommandUnzip-o-d/home/sunnymyfile.zipExtractthemyfile.zipfileto/home/sunny/Overwritefileswithoutprompting----o
5、;----d:-d/home/sunnyindicatesthatthefileisdecompressedtothe/home/sunnydirectory;3)thetarcommandTarcreatesfilesforfilesanddirectories.Usingtar,userscancreatefilesforaparticularfile(backupfiles),orchangefilesinfiles,oraddnewfilestofiles.Tarwasoriginallyusedtocreatefilesontape,andnowuserscancreatefiles
6、onanydevice,suchasfloppydisks.Usingthetarcommand,youcanpackagealargenumberoffilesanddirectoriesintoafile,whichisveryusefultobackupfilesortocombineseveralfilesintoafiletofacilitatenetworktransmission.ThetaronLinuxistheGNUversion.Tarcommanddetailed-c:createscompressionfiles-x:decompression-t:checkthec
7、ontent-r:appendfilestotheendofthecompressedarchive-u:updatethefilesintheoriginalzipThesefiveareseparatecommands,andcompressionanddecompressionareneededforoneofthem,whichcanbeusedinconjunctionwithother