Rclone basic commands and their usage
Rclone is a command-line program to manage files on cloud storage. It is a feature-rich program to easily manage remote files. Many cloud services are supported by rclone. This guide will take you through the basic commands of rclone. Rclone can be used both for uploading and downloading the files on cloud services.
Features of rclone:
- Copy – new or changed files to cloud storage
- Sync – (one way) to make a directory identical
- Move – files to cloud storage, deleting the local after verification
- Check hashes and for missing/extra files
Rclone commands :
- Copy :
To copy a file from source to destination:
rclone copy /home/testfolder/test.txt test:/Here test.txt file is present in /home/testfolder(source), test:/(destination) is the root of the remote.
To copy a file from the destination to the source:
rclone copy test:/test.txt /home/testfolderHere test.txt file is present in the root of the remote test(source), /home/testfolder/(destination) is the remote destination where the file will be copied.
Note: If google drive is remote and if it gives malware-infected error then please use –drive-acknowledge-abuse flag to download such files.
rclone copy test:/ /home/testfolder/test.txt --drive-acknowledge-abuse
- Sync :
To sync files from the cloud to local:
rclone sync test:/ /home/testfolder/Here the test is the source remote, /home/testfolder/ is the destination.
To sync files from local to the cloud:
rclone sync /home/testfolder/ test:/Here /home/testfolder/ is the source, the test is the remote destination.
Note: Since this can cause data loss, test first with the –dry-run flag.
- Move :
rclone move /home/testfolder/ test://home/testfolder/ is the source of files, test:/ is the remote destination.
- List files: Displays the files located on the remote.
rclone ls test:/test is remote, / is the path on the remote.
- Cleanup: Empty the trash or delete old file versions.
rclone cleanup test:/
Note: Not supported by all remotes.
- Copy :
Don’t have Rclone installed on your system? Follow the guide below for instructions.
How to install Rclone on Linux and create Google drive remote