-
gzip -rc 被压缩目录 > 生成的文件名
这样压缩会导致目录全部压缩成一个文件,不能还原成各个文件 -
tar -zcvf 压缩生成的名字.tar.gz 被压缩的目录
这样压缩才能保证各个文件可以还原
切记不可被压缩目录不要使用多层级路径,这样每一个层级都会被压缩进去,解压也会还原层级
- 示例以下
$ tar -zcvf pl.tar.gz ./0.bin/
./0.bin/
./0.bin/deal_ensembl/
./0.bin/deal_ensembl/gtf2gff_2.pl
./0.bin/deal_ensembl/data_clean.pipeline.pl
./0.bin/deal_ensembl/id_history_converter/
./0.bin/deal_ensembl/id_history_converter/IDmapper.pl
./0.bin/deal_ensembl/id_history_converter/idmapper.in
./0.bin/deal_ensembl/id_history_converter/README.txt
./0.bin/deal_ensembl/id_history_converter/Bio/
./0.bin/deal_ensembl/id_history_converter/Bio/EnsEMBL/
./0.bin/deal_ensembl/id_history_converter/Bio/EnsEMBL/Registry.pm
./0.bin/deal_ensembl/test/
网友评论