Unbuntu server 操作文件命令

zip xx.zip压缩,
unzip xx.zip 解压,
tar zcvf xx.tar.gz压缩
tar zxvf xx.tar.gz解压

使用 scp 命令完成文件的上传和下载

上传

  • 上传单个文件
scp -p port source_dictionary_file user@ServerIp:target_dictionary_file
  •  

prot 默认是22,如果使用默认可以不写

scp /User/hellowood/wechat.jpg [email protected]:/home/hellowood/wechat.jpg
  •  
  • 上传整个文件夹
scp -p port -r source_dictionary user@ServerIp:target_dictionary
  •  
scp -r /User/hellowood/tomcat [email protected]:/home/hellowood/tomcat
  •  

下载

  • 下载单个文件
scp -p user@ServerIp:source_dictionary_file target_dictionary
  • 1
scp [email protected]:/home/hellowood/wechat.jpg /User/hellowood/wechat.jpg
  •  
  • 下载文件夹
scp -p port -r user@ServerIp:source_dictionary target_dictionry
  •  
scp -r [email protected]:/home/hellowood/tomcat /User/hellowood/tomcat

猜你喜欢

转载自blog.csdn.net/huapenguag/article/details/82882145