tar create archive file
[syntax] tar [option] tarfile filename
[command description]
The file name must follow the -f parameter, and As the last item of the parameter;
[Parameter Description]
-c Create a new archive file;
-f Specify the file name;
-r Append files to the archive;
-x Extract files from archive files;
-v,-vv Display progress information;
-t List Archive file information (not extracted);
-C specifies the directory to extract files;
-A merges multiple tar files;
--totals After archiving is completed, Print the total number of archive bytes;
--delete Delete the specified file from the archive;
--exclude Exclude files of the specified style when archiving;
- j When the archive file is generated, it is compressed using the bunzip2 format;
-z When the archive file is generated, it is compressed using the gzip format;
--lzma When the archive file is generated, it is compressed using the lzma format. ;
-a When the archive file is generated, it is automatically compressed according to the extension;
[General usage]
#打tar包, the name is all.tar
$ tar -cvf all.tar *.text;
#Add file b.doc
$ tar -rvf all.tar b.doc;
#List the contents of the archive
$ tar -tvf All.tar;
#Extract all files in the archive
$ tar -xvf all.tar;
$ tar -xvf all.tar -C /opt/App/tool_dir;
#Extract the specified file in the archive file
$ tar -xvf all.tar file_one file_two
#merge two tar files
$ tar -Af file_one.tar file_two.tar
# Delete the specified file
$ tar -f all.tar --delete file_one file_two
#Archive, Exclude log files
$ tar -cf all.tar * --exclude ”*.log”
gzip/gunzip for compression/decompression
[syntax] Br>
gzip [options] file;
gunzip [options] file;
[command description]
gzip can only compress a single file, if multiple File, will generate multiple separate compressed files;
gzip will delete the source file after generating the compressed file!!!!
gu Nzip will delete the source file after the decompression is completed!!!
[Parameter Description]
-l,--list List the attribute information of the compressed file;
--fast specifies the lowest compression ratio;
--best specifies the highest compression ratio;
-n specifies the compression ratio (n is a number and 1<=n<=9);
-v displays progress information;
bzip2/bunzip2 for compression/decompression
[syntax]
bzip2 file;
bunzip2 file ;
[Command Description]
bzip2 can usually generate files with higher compression ratio than gzip; default bzip2 will delete the source file, and use -k parameter to retain the source file;
[Parameter Description]
-k keeps the source file;
-n specifies the compression ratio (n is a number, and 1<=n<=9);
Zip/unzip for compression/decompression
Syntax zip [options] file file dirs
[command description]
After zip compression/decompression, it will not be deleted Source file;
[Parameter description]
-r Recursion; used when compressing directories;
-l List compressed file contents;
-d Delete the specified file from the compressed file;
-u Update the inside of the compressed file Capacity;
[General usage]
#压缩文件
$ zip all.zip file;
$ zip all.zip file_one file_two;
$ zip -r all.zip dir_name;
#update compressed file
$ zip all.zip -u log.text
# Delete the specified content
$ zip -d all.zip log.text;
# unpacking files
$ unzip all.zip;
# listing compressed file contents
$ unzip -l all.zip;
What should I do if the Ubuntu system Grub fails? Many computer users think of reloading: Grub, howe
minicom is very easy to use, but sometimes not intuitive enough, it is recommended that newcomers, e
1, need to upload or download, you need to use the rz and sz commands. If you do not have th
My computer has two hard drives, one solid state drive (sda) installed win7, another ordinary hard d
Sort|uniq| Cut| Wc (my first markdown note)
Linux mount mountcsi, ntfs, nfs through mount
Linux advanced skills: cluster's keepalived
Vim tools commonly used in Linux
Taglist and ctags installation in Ubuntu, simple and clear
Linux multi-command sequential execution
The difference between setting the environment variable configuration file under Linux
Secret: Pull out the built-in serial number
[Video] Win10 latest version of Build 10041 new features to get started experience video
Can't install Tencent QQ under Windows 8, what should I do?
Microsoft Windows 7 Beta cancels 2.5 million limit
The Win XP Auto Recovery System Repair Disk
Win7 shared wireless network graphic tutorial
Win XP teach you to know in ten special file
How to set the eye color of Win8.1?
Fun under win7 QQ concept version of the experience of the nine new features (2)