CS155 Archives
gzip
: compress file
gunzip
: uncompress file
bzip2
: compress file
bunzip2
: uncompress file
% ls -l total 112 -rw------- 1 boese fac 108447 Feb 6 10:39 test_file % gzip test_file % ls -l total 32 -rw------- 1 boese fac 32174 Feb 6 10:39 test_file.gz % gunzip test_file.gz % bzip2 test_file % ls -l total 28 -rw------- 1 boese fac 27350 Feb 6 10:39 test_file.bz2
bzip2
usually produces smaller files, but it also takes longer to run.
tar
– tape archive
tar
allows us to put many files into a single file
while preserving the directory structure
zip
- works on Unix and Windows
tar
or zip
is a convenient way of
backing up files or sending a group of files to someone.
tar
– tape archive
tar
allows us to put many files into a single file
while preserving the directory structure
tar
is a convenient way of backing up files
or sending a group of files to someone.
tar
operation [options] files
tar -cvf my_tar.tar my_dir/ my_file
tar -tvf my_tar.tar
tar -xvf my_tar.tar
my_file2
into the current directory tar -xvf my_tar.tar my_file2
Using tar
, we can filter archives through a compression program.
tar -zcvf my_tar.tgz my_files/
tar -zxvf my_tar.tgz
tar -cjvf /tmp/my_tar.tbz .
zip
operation [options] files
zip myArchive.zip my_dir/* my_file
unzip -l myArchive.zip
unzip -d temp_dir myArchive.zip
zip -u myArchive.zip my_file2
unzip -d temp_dir myArchive.zip my_file2
Modified: 2016-01-14T12:43 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |