Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Upload a folder using the sftp command

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

#Preface

Sftp uploads a single file using put, multiple files can use mput, but to upload the entire folder, it is more complex, requiring multiple command combinations, including find, awk, etc.

# sftp Upload Folder

```

#!/ bin/bash

sss=`find /ngs/ecv1/AppServer -type d -printf /app/AppServer/'%P\n'| awk '{if ($0 == "")next;print "mkdir " $0}'`

aaa=`find /ngs/ecv1/AppServer -type f -printf 'put %p %P \n'`

sftp webuser@12.97.18.1

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report