[LINUX] Wget files on OneDrive

Summary of this article

File linkage between environments where FTP or SCP cannot be used (or it is troublesome to enable it) via OneDrive

Prerequisite environment

wget --version
GNU Wget 1.14 built on linux-gnu.

procedure

Make files uploaded to OneDrive shareable

Operate on the web interface.

Right-click on the target file and press "Share". 2020-07-11 (2).png

Generate a file download URL

Right-click the target file again and click "Embed". 2020-07-11 (2).png

Click "Generate". 2020-07-11 (4).png

The URL is defined in the src attribute of the generated embedded tag. Replace embed? `` `of this URL with download? `` `.

https://onedrive.live.com/embed?cid=xxxxx
    ↓
https://onedrive.live.com/download?cid=xxxxx

The URL after rewriting will be the download URL.

wget

Wget the file at the destination you want to link. The URL must be enclosed in single quotes.

wget 'https://onedrive.live.com/download?cid=xxxxx' -O <file name>

This completes the download.

Summary

It's quite convenient when it's not enough to prepare the environment. If it's a big file that can't be uploaded to OneDrive, let's FTP it obediently.

Recommended Posts

Wget files on OneDrive
Copy files locally on Vagrant (scp)
Find large files / directories on Linux
Find files like find on linux in Python
Notes on creating static files in Django
Download files on the web with Python
How to find large files on Linux