Review notes 3

Source: Internet
Author: User
  1. Dump command usage

    The dump command can back up the entire file system and perform Incremental backup to back up the entire file system or the directory. However, when backing up a directory, you can only perform full backup, but not Incremental backup.

    Dump-#-J-u-F name of the file backed up by filesystem or directory

    -# Specifies the backup level. 0 indicates full backup, and 1 indicates Incremental backup. -J indicates that data can be compressed during Backup.

    Dump-W can be used to view the backup information of the file system to be backed up in/etc/fstab.

    Dump-S can list the size of the files to be backed up.

  2. Use of the restore command.

    The restore command can be used to restore the file system or directory backed up by using dump.

    Restore-r-F dump_fTo restore the entire file system, you must create a new partition and format it Before restoring it.

    Restore-r-c-F dup_file-D mountpoint can compare the backup file with the current file.

    When the restore-I-f dump_file restores the Backup Directory, you can enter the interactive mode and choose to recover the directory.

  3. Dd command usage

    Dd can also back up the file system

    Dd If = files_to_backup of = filename to back up files. Then, use dd If = filename of = files_to_backup to restore the file.

    The most powerful feature of the DD command is that the DD command can back up files directly at the block level. You can back up information such as MBR of a disk. For example

    Dd If =/dev/sda1 of =/dev/sdb1 sdb1 is an unformatted partition, but after backup, sdb1 can be directly mounted and used.

  4. Cpio implements backup.

    Cpio is backed up based on the file level, but cpio backup files can only be output from pipelines or other commands. The basic format is as follows:

    Cpio-cvcb> filename

    Cpio-icvcd <FILENAME

    The biggest benefit of cpio command backup is that data can be backed up to the device.

  5. Use of VIM commands.

    CC deletes the specified row and inserts it.

    Delete 10 rows in 10cj.

    Press Ctrl + V to enter the block mode and select by character.

    Press Ctrl + V to enter the block mode. Select by row.

    Vim file1 file2 can open multiple files at the same time. Input: file to view the opened file. Input: n to switch files. The advantage is that it can be pasted and copied between different files.

    : SP can divide a file into two windows. : SP file can open a new window. The window is switched up using Ctrl + W + K. CTRL + W + J down.

  6. Use iconv to change the file encoding format.

    Iconv-F format-t new format filename-O output. filename

Review notes 3

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.