본문 바로가기

리눅스

rclone 삭제 시 휴지통거치지 않고 바로 지우기

반응형

rclone을 사용해서 delete를 하면 휴지통으로 이동이 됩니다.

이를 휴지통으로 이동하지 않고 바로 삭제하려면 --onedrive-hard-delete 옵션을 사용하면 됩니다.

> rclone delete onedrive:/My Folder/*.jpg --onedrive-hard-delete=true

 

확인 해 보시려면 다음과 같은 명령어를 사용하면 됩니다.

> rclone about onedrive:

Total:   1 TiB
Used:    54.035 GiB
Free:    969.965 GiB
Trashed: 0 B

 

참조:

https://rclone.org/onedrive/#onedrive-hard-delete

 

Microsoft OneDrive

© Nick Craig-Wood 2014-2025 Source file onedrive.md last updated 2025-02-14 Uploaded with rclone. Built with Hugo. Logo by @andy23. Served by Caddy. Hosted at Hetzner Cloud.

rclone.org

 

추가:

몇 가지 변동사항이 있어 추가합니다.

OneDrive나 GoogleDrive등의 옵션이나 로그인 정보가 변경되었을 경우 다음과 같이 다시 설정하면 됩니다.

> rclone config reconnect GoogleDrive:

Already have a token - refresh?
y) Yes (default)
n) No
y/n>

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> n

 

Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
        rclone authorize "drive" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Then paste the result.
Enter a value.

 

위에서 " Use web browser to automatically authenticate rclone with remote?" 질문의 답을 "n"로 하면

접속하는 외부 링크를 알려줍니다. 로컬이 아닌 외부 접속으로 사용하고 있다면

rclone authorize "drive" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

를 복사해서 로컬명령창이나 wsl 등에 붙여 넣으면 됩니다.

이때 자동으로 브라우저가 실행된는 것을 막으려면 "--auth-no-open-browser" 옵션을 사용하면 됩니다.

> rclone authorize "drive" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --auth-no-open-browser

이런 식으로 사용하면 됩니다.

 

반응형