代碼: |
netcat 簡稱 nc. Netcat 是一把非常簡單易用的基於 TCP/IP 協議(C/S模型的)的「瑞士軍刀」(man裡面,第一句就是這樣說的),它能允許我們通過網路創建管道(pipe)。 dump 和 restore 是用於備份和恢復系統的常用命令。位於dump包中。可以apt-get install dump。 |
代碼: |
restore說明: -f file Read the backup from file; file may be a special device file like /dev/st0 (a tape drive), /dev/sda1 (a disk drive), an ordinary file, or - (the standard input). If the name of the file isof the form host:file or user@host:file, restore reads from the named file on the remote host using rmt(8). -r Restore (rebuild) a file system. The target file system should be made pristine with mke2fs(8), mounted, and the user cd』d into the pristine file system before starting the restoration of the initial level 0 backup. If the level 0 restores successfully, the -r flag may be used to restore any necessary incremental backups on top of the level 0. The -r flag precludes an interac? ive file extraction and can be detrimental to one』s health (not to mention the disk) if not used carefully. An example: mke2fs /dev/sda1 mount /dev/sda1 /mnt cd /mnt restore rf /dev/st0 Note that restore leaves a file restoresymtable in the root directory to pass information between incremental restore passes. This file should be removed when the last incremental has been restored. |
代碼: |
dump說明: -f file Write the backup to file; file may be a special device file like /dev/st0 (a tape drive), /dev/rsd1c (a floppy disk drive), an ordinary file, or - (the standard output). Multiple file names may be given as a single argument separated by commas. Each file will be used for one dump volume in the order listed; if the dump requires more volumes than the number of names given, the last file name will used for all remaining volumes after prompt?ing for media changes. If the name of the file is of the form host:file or user@host:file dump writes to the named file on the remote host (which should already exist, dump doesn』t create a new remote file) using rmt(8). The default path name of the remote rmt(8) program is /etc/rmt; this can be overridden by the environment variable RMT. [-level#] |
代碼: |
nc - TCP/IP swiss army knife說明: -l listen mode, for inbound connects -n numeric-only IP addresses, no DNS -o file hex dump of traffic -p port local port number (port numbers can be individual or ranges: lo-hi [inclusive]) -q seconds after EOF is detected, wait the specified number of seconds and then quit. |
代碼: |
sudo dump -0 -f - /var/cache/apt/archives/ | nc 10.23.1.100 2000 ~$ nc -l -p 2000 -q 1 | restore -r -f - |
[火星人 ] 使用netcat命令網路同步複製系統已經有522次圍觀