In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to operate the linux command line to upload and download files on cloud disk. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Install pip3 install-I https://pypi.tuna.tsinghua.edu.cn/simple/ bypy==1.7.52. Log in to Baidu Cloud account
Input: bypy info
Then log in: https://openapi.baidu.com/oauth/2.0/authorize?client_id=q8WE4EpCsau1oS0MplgMKNBn&response_type=code&redirect_uri=oob&scope=basic+netdisk
Obtain the authorization code as shown in the figure:
After connecting the network disk, some license files will be generated in the ~ / .bypy directory. There is no need for authorization to use bypy next time. If you want to exit the authorization, you can rm-rf ~ / .bypy /.
3. Upload files
After uploading the file, the file is saved in the directory of all files / my application resources / bypy (that is, / app/bypy/).
Upload specified file: bypy upload file name upload current directory: bypy upload
4. Download a file
Due to Baidu PCS API permission restrictions, the program can only access files and directories under the Baidu cloud / apps/bypy directory. At present, there seems to be a speed limit, and the download rate is stable at 5MB/s, but it is also much better than 500KB/s.
Download the specified file: bypy downfile file name download the current directory: bypy downfile-v;-v display details
5. Other commands
Bypy: show using help and all commands
Bypy compare: compare the current directory with the root directory of cloud disk (/ apps/byby)
Bypy syncdown: synchronize the contents of the cloud disk locally
Bypy syncup: synchronize the current directory to the cloud disk
Bypy list: displays a list of files under the root directory of the cloud disk
Bypy help: learn more about a command
Bypy mkdir: create a subdirectory in the current directory of the cloud disk
6. Python code calls from bypy import ByPybp=ByPy () bp.list () # or whatever instance methods of ByPy class on "linux command line how to operate cloud disk upload and download files" this article ends here. I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, please share it out for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.