Linux backup file command collection

Source: Internet
Author: User
Tags uncompress

Ar

Function Description: create or modify a file to be kept, or extract files from the file to be kept.

Syntax: Ar [-dmpqrtx] [cfossuvv] [A <member files>] [B <member files>] [I <member files>] [keep files] [member files]

Note: Ar allows you to collect many files and make them a single file. All member files keep their original attributes and permissions.

Parameters:
Command Parameters
-D. Delete the member files in the keep file.
-M: change the order in which member files are stored.
-P: displays the content of the member file in the file.
-Q will append the user to the end of the file to be kept.
-R: insert the file into the storage file.
-T displays the files contained in the kept files.
-X saves the member files in your own files.
Option Parameter
A <member File> Insert the file into the specified member file in the keep file.
B <member File> before inserting a file into a specified member file in the kept file.
C. Create and keep documents.
F. To prevent too long file names from being compatible with Ar commands of other systems, you can use this parameter to cut down the names of long member files to be placed in the files.
I <member files> before you insert a specified member file in the kept file.
O preserve the date on which files are kept.
S if the file to be kept contains the object mode, you can use this parameter to create a symbol table for the file to be kept.
S does not generate a symbol table.
U only inserts new files with a specified date into the keep file.
VProgramDetailed information is displayed during execution.
V displays the version information.

--------------------------------------------------------------------------------

Bunzip2

Function Description: Decompress the. bz2 file.

Syntax: bunzip2 316-fklsvv00000000.bz2 compressed file]

Note: bunzip2can decompress the. bz2 compressed file. Bunzip2 is actually a symbolic connection of Bzip2, and the effect of running bunzip2 is the same as that of Bzip2-D.

Parameters:
-F or -- force: If the output file has the same name as the existing file, the existing file is not overwritten by default. To overwrite data, use this parameter.
-K or -- keep after decompression, the original compressed file is deleted by default. To retain the compressed file, use this parameter.
-S or -- small reduces the memory usage during program execution.
-V or -- verbose displays detailed information when extracting the file.
-L, -- license,-V, or -- version displays version information.

--------------------------------------------------------------------------------
Bzip2

Function Description:. bz2 File compression program.

Syntax: Bzip2 [-cdfhklstvvz] [-- repetitive-best] [-- repetitive-fast] [-compression grade] [file to be compressed]

Note: Bzip2 adopts a new compression functionAlgorithm, The compression effect is better than the traditional lz77/lz78 compression algorithm. If no compression file is added, the compressed file .bz2 will be uploaded and the original file will be deleted.

Parameters:
-C or -- stdout sends the compression and decompression results to the standard output.
-D or -- decompress.
-F or -- force Bzip2 will not overwrite the existing file if the output file has the same name as the existing file during compression or decompression. To overwrite data, use this parameter.
-H or -- help displays help.
-K or -- keep Bzip2 will delete the original file after compression or decompression. To retain the original file, use this parameter.
-S or -- small reduces the memory usage during program execution.
-T or -- test the integrity of the. bz2 compressed file.
-V or -- verbose displays detailed information when compressing or extracting files.
-Z or -- compress enforces compression.
-L, -- license,
-V or -- version displays version information.
-- Repetitive-best: this parameter can be used to improve the compression effect if duplicate data appears in the file.
-- Repetitive-fast: this parameter can be used to speed up execution if duplicate data appears in the file.
-The block size when the compression level is compressed.

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Bzip2recover

Function Description: used to repair the .bz2 file.

Syntax: bzip2recover. bz2 compressed file]

Note: Bzip2 compresses files in blocks, and each block is considered as an independent unit. Therefore, when a block is damaged, you can use bzip2recover to separate the block in the file to decompress the normal block. It is usually applicable only when the compressed file is large.

--------------------------------------------------------------------------------

Compress

Function Description: compress or decompress a file.

Syntax: compress [-cdfrvv] [-B <compression efficiency>] [files or directories...]

Note: compress is a compressed program with a long history. After a file is compressed, its name will be followed by an extension of ". Z. You can run the uncompress command to decompress the package. In fact, uncompress is a symbolic connection to compress. Therefore, you can use the compress command to perform compression or decompression separately.

Parameters:
-B <compression efficiency> the compression efficiency is a value between 9 and 16. The preset value is "16". The larger the value, the higher the compression efficiency.
-C: output the compressed file to the standard output device without modifying the original file.
-D decompress the file instead of compressing it.
-F forcibly Save the compressed file, regardless of whether the file name or hard connection exists, whether the file is symbolic connection, and whether the compression efficiency is high or low.
-R recursive processing: all files and subdirectories in the specified directory are processed together.
-V shows the command execution process.
-V displays the command version and program preset values.

--------------------------------------------------------------------------------

Cpio (copy in/out)

Function Description: backup files.

Syntax: cpio [-0 aabcklovv] [-C <input/output size>] [-F <Backup File>] [-H <backup format>] [-O <Backup File>] [-- block-size = <block size>] [-- force-local] [-- help] [-- Quiet] [-- version] Or cpio [-bbcdfikmnrsstuvv] [-C <Input /output size>] [-E <Template File>] [-F <Backup File>] [-H <backup format>] [-I <Backup File>] [-m <return information>] [-r <owner> <: /.> <group>] [-- block-size = <block size>] [-- force-local] [-- help] [-- no-absolute-filenames] [-- no-preserve- owner] [-- only-verify-CRC] [-- Quiet] [-- sparse] [-- version] [template style...] or cpio [-0 adkilmpuvv] [-r <owner> <:/.> <group>] [-- help] [-- no-preserve-owner] [-- Quiet] [-- sparse] [-- version] [PURPOSE]

Note: cpio is a tool program used to create and restore backup files. It can be used to unbind files in the cpio or tra backup files.

Parameters:
-0 or -- null accepts new column control characters, which are usually used with the "-print0" parameter of the find command.
-A or -- reset-access-time: reset the file access time.
-A or -- append is appended to an existing backup file, which must be stored on the disk rather than on the tape drive.
-B or -- Swap. This parameter has the same effect as the "-SS" parameter.
-B: change the size of the input/output block to 5210 bytes.
-C uses the old ASCII backup format.
-C <block size> or -- IO-size = <block size> sets the size of the input/output block in bytes.
-D or -- make-directories create a directory if you need cpio.
-E <Template File> or -- pattern-file = <Template File> specifies the template file, which contains one or more template styles to enable cpio to unbind files that meet the template conditions, the format is a template style for each column.
-F or -- nonmatching allows cpio to unbind all files that do not meet the template conditions.
-F <Backup File> or -- file = <Backup File> specifies the name of the backup file to replace the standard input or output, you can also use the storage device of another host to access the backup file through the network.
-H <backup format> specifies the file format to be used for backup.
-I or -- extract executes copy-in mode to restore the backup file.
-L <Backup File> specifies the name of the backup file to replace the standard input. You can also use the storage device of another host to read the backup file through the network.
-K this parameter will be ignored and will only be used to solve compatibility issues between different cpio versions.
-L or -- Link Replace the copy object in hard connection mode and can be used in copy-pass mode.
-L or -- dereference does not establish a symbolic connection, directly copying the original file pointed to by the connection.
-M or preserve-modification-time does not change the file change time.
-M <return information> or -- message = <return information> sets to replace and save media information.
-N or -- Numeric-UID-gid when you use the "-TV" parameter to list the content of the backup file, if you add the parameter "-n ", the user ID and group ID will replace the owner and group name to list the file list.
-O or -- create runs copy-out mode to create a backup file.
-O <Backup File> specifies the name of the backup file to replace the standard output. It can also store the backup file using the storage device of another host over the network.
-P or -- pass-through: Execute copy-pass mode, skip the backup step, and copy the file directly to the target directory.
-R or -- rename: interaction mode is used when the file name needs to be changed.
-R <owner> <:/.> <group> or
---- Owner <owner> <:/.> <group> when restoring backup files in copy-in mode or copying files in copy-pass mode, you can specify the owner and group of the copied files.
-S or -- Swap-bytes exchanges the content of each pair of bytes.
-S or -- Swap-halfwords exchange the content of each half byte.
-T or -- list indicates the input content.
-U or -- unconditional replace all files, regardless of whether the date and time are old or new, they are not asked and directly overwritten.
-V or -- verbose displays the instruction execution process in detail.
-V or -- dot: Add "." before the execution program of each file
-- Block-size = <block size> set the size of the input/output block. If the value is set to 5, the block size is 2500. If the value is set to 10, the block size is 5120, and so on.
-- Force-local forces the backup file to be stored on the local host.
-- Help Online Help.
-- No-absolute-filenames use the relative path to create a file name.
-- No-preserve-owner does not keep the owner of a file. Whoever unlocks the backup file will own those files.
-Only-verify-CRC: When the backup file adopts the CRC backup format, you can use this parameter to check whether each file in the backup file is correct.
-- Quiet does not show how many blocks are copied.
-- Sparse if a file contains a large number of consecutive 0 bytes, it is saved as a sparse file.
-- Version: displays the version information.

--------------------------------------------------------------------------------

Dump

Function Description: backs up the file system.

Syntax: dump [-CNU] [-0123456789] [-B <block size>] [-B <block quantity>] [-D <density>] [-F <Device Name>] [-H <level>] [-S <tape length>] [-T <date>] [directory or file system] or dump [-ww]

Note: dump is a backup tool program that backs up a directory or entire file system to a specified device, or backs up a large file.
Parameters:
-0123456789 backup level.
-B <block size> specifies the block size, in KB.
-B <block quantity> specifies the number of blocks in the backup volume.
-C. Modify the preset density and capacity of the backup tape.
-D <density> sets the tape density. The Unit is BPI.
-F <Device Name> specifies the backup device.
-H <level> when the backup level is equal to or equal to the level specified by heavy rain, files marked as "nodump" by the user are not backed up.
-N when the backup job requires administrator intervention, send a notification to all users in the "operator" group.
-S <tape length> Backup Tape length, in feet.
-T <date> specifies the backup start time and date.
-After the U backup is complete, record the backup file system, level, date and time in/etc/dumpdates.
-W is similar to-W, but only displays the files to be backed up.
-W: displays the file to be backed up and the level, time, and date of the last backup.

--------------------------------------------------------------------------------

Gunzip (GNU unzip)

Function Description: Decompress the file.

Syntax: gunzip [-acfhllnnqrtvv] [-S <compressed character string>] [file...] or gunzip [-acfhllnnqrtvv] [-S <compressed character string>] [Directory]

Note: gunzip is a widely used decompression program used to uncompress files compressed by gzip. The default extension of these compressed files is ". GZ ". In fact, gunzip is the hard connection of gzip. Therefore, you can use the gzip command to complete it independently, whether it is compression or decompression.

Parameters:
-A or -- ASCII uses the ASCII text mode.
-C or -- stdout or -- to-stdout output the extracted files to the standard output device.
-F or-force forcibly unbind the compressed file, regardless of whether the file name or hard connection exists, and whether the file is a symbolic connection.
-H or -- Help Online Help.
-L or -- list lists information about compressed files.
-L or -- license displays version and copyright information.
-N or -- no-name: during decompression, if the compressed file contains a remote file name and timestamp, it will not be processed.
-N or -- name: If the compressed file contains the original file name and timestamp, it is stored back to the unzipped file.
-Q or -- Quiet does not display warning information.
-R or -- Recursive recursive processing: all files and subdirectories under the specified directory are processed together.
-S <compression character string> or -- suffix <compression character string> to change the compression character string.
-T or -- test to test whether the compressed file is correct.
-V or -- verbose displays the command execution process.
-V or -- version displays version information.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.