Linux Command tar, linux Command tar
The tar command is a reliable method for backing up files in Unix/Linux systems. It can work in almost any environment and has the permission of all users.
Syntax:
For details about how to use the linux tar command to compress, view, decompress, and use the tar command
Command prototype:
Tar [Option…] [FILE]…
New
-C,--create creates a new compressed file
View
-T,-list: list archived co
One requirement is to compress a folder, but to exclude another folder--exclude command, but execute on Mac
TAR-ZCVF test.tgz test/--exclude *.jpg
Always prompt
Tar:--exclude:cannot stat:no such file or directory
And on Linux does not prompt this error, in the end is why?Later found that Mac and Linux do not deal with this parameter, t
First, find out what full backup, Incremental backup, and differential backup are. In short, it can be understood as follows:
Full backup: Back up all files once.
Incremental Backup: the difference between this backup and the previous backup.
Differential backup: Backup Based on full backup.
A tar command
# Create a test folder and file [root @ serv01 web] # cd/data [root @ serv01 data] # ls [root @ s
Packaging Example: package files in the /usr/local/src/zlib-1.2.5 directory into zlib-1.2.5.tar.gzCD/USR/LOCAL/SRCTAR-CZVF./zlib-1.2.5.tar.gz/zlib-1.2.5/*# compressed into the development directory (for example:/root/2/) tar-czvf/root/2/ zlib-1.2.5.tar.gz./zlib-1.2.5/*
#压缩
TAR-CZVF ***.tar.gz
TAR-CJVF ***.tar.bz2
#解压缩
Run the tar command and run the tar command to implement full backup and Incremental backup. First, find out what full backup, Incremental backup, and differential backup are. In short, it can be understood as follows: Full backup: A backup is performed on all files. Incremental Backup: the difference between this back
It is generally easy to package directly with the tar command, using TAR-ZCVF test.tar.gz test directly.In many cases, we have to package a directory, and there are dozens of subdirectories and sub-files in this directory, we need to exclude 1, 2 directories or files when packaging.At this time we are packing with the tar
One linux command every day (28): tar command link: One linux command every day (1): ls command http://www.2cto.com/os/201210/163049.html ; One linux command every day (2): cd command h
One linux Command every day (28): tar command link: One linux Command every day (1): ls command http://www.bkjia.com/ OS /201210/163049.html#linuxlinuxcommand every day (2): cd command serial (3 ): pwd
Access to the server through SSH, it is inevitable to use compression, decompression, packaging, unpack, etc., this time the tar command is essential to a powerful tool. The most popular tar in Linux is though small, spite, and powerful.
The tar command creates files for Li
Through SSH access to the server, will inevitably use compression, decompression, packaging, unpacking, etc., this time the tar command is an essential tool for a powerful. The most popular tar in Linux is the perfectly formed, the most powerful.The TAR command creates archi
through SSH access to the server, will inevitably use compression, decompression, packaging, unpacking, etc., this time the tar command is an essential tool for a powerful. The most popular tar in Linux is the perfectly formed, the most powerful. The TAR command creates arch
Original URL: http://www.cnblogs.com/peida/archive/2012/11/30/2795656.htmlThrough SSH access to the server, will inevitably use compression, decompression, packaging, unpacking, etc., this time the tar command is an essential tool for a powerful. The most popular tar in Linux is the perfectly formed, the most powerful.The TAR
The TAR command creates archives for Linux files and directories. With tar, you can create files (backup files) for a specific file, or you can change files in the file or add new files to the file. Tar was originally used to create archives on tape, and now users can create files on any device. With the
Through SSH access to the server, will inevitably use compression, decompression, packaging, unpacking, etc., this time the tar command is an essential tool for a powerful. The most popular tar in Linux is the perfectly formed, the most powerful.The TAR command creates archi
Through SSH access to the server, it will inevitably use compression, decompression, packaging, unpacking, etc., this time the tar command is a necessary powerful tool. The most popular tar in Linux is the perfectly formed.The tar command creates a file for Linux files and d
compressed files to make a summary:1 for. Tar End of FileTAR-XF All.tar2 for. GZ End of FileGzip-d all.gzGunzip all.gz3. Documents ending with. tgz or. tar.gzTar-xzf all.tar.gzTar-xzf all.tgz4 for. bz2 End of FileBzip2-d all.bz2BUNZIP2 all.bz25) For tar.bz2 end of fileTAR-XJF all.tar.bz26) for. File at the end of ZUncompress all. Z7 for. Tar.z End of FileTar-xzf All.tar.zIn addition to the common compressed files under
Access to the server through SSH, it is inevitable to use compression, decompression, packaging, unpack, etc., this time the tar command is essential to a powerful tool. The most popular tar in Linux is though small, spite, and powerful.
The tar command creates files for Li
Linux tar command parameters and usage details--linux Package backup command tarCommandGNU version of the Tar-tar file management program. The meanings are described belowtar [-cxtzjvfppn] files and directories .... Common parameters: -C: Establish a Compress the parameters
compression ratio as gzip, but is not widely used.
The common formats are tar.gz and tar.bz2. If you want to compress quickly, gzip is used. If the size of the archive file is important, use tar.bz2.
What is the tar command used?
The following are some common cases of using the tar command.
Backup Server or desktop
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.