遠程操做Linux,用以下命令,能夠實現內網互相拷貝的功能:
# scp -r root@192.168.0.2:/home/push/upload/* /home/push/upload/
該命令有以下幾個參數:
-p 拷貝文件的時候保留源文件創建的時間。 Preserves modification times, access times, and modes from the original file.
-q 執行文件拷貝時,不顯示任何提示消息。 : disables the progress meter as well as warning and diagnostic messages from ssh(1).
-v 拷貝文件時,顯示提示信息。 Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress.
-r 拷貝整個目錄。Recursively copy entire directories.
若是不支持scp,則須要用以下命令安裝它:
# yum install openssh-clientsssh