docs: update documentation of commands delete,purge,rmdir,rmdirs

This commit is contained in:
albertony
2020-11-13 11:07:34 +01:00
committed by Nick Craig-Wood
parent fb001b6c01
commit 79474b2e4c
4 changed files with 30 additions and 17 deletions

View File

@@ -21,25 +21,26 @@ func init() {
var commandDefinition = &cobra.Command{
Use: "delete remote:path",
Short: `Remove the contents of path.`,
Short: `Remove the files in path.`,
Long: `
Remove the files in path. Unlike ` + "`" + `purge` + "`" + ` it obeys include/exclude
filters so can be used to selectively delete files.
` + "`" + `rclone delete` + "`" + ` only deletes objects but leaves the directory structure
` + "`rclone delete`" + ` only deletes files but leaves the directory structure
alone. If you want to delete a directory and all of its contents use
` + "`" + `rclone purge` + "`" + `
the ` + "`purge`" + ` command.
If you supply the --rmdirs flag, it will remove all empty directories along with it.
You can also use the separate command ` + "`rmdir`" + ` or ` + "`rmdirs`" + ` to
delete empty directories only.
Eg delete all files bigger than 100MBytes
Check what would be deleted first (use either)
For example, to delete all files bigger than 100MBytes, you may first want to check what
would be deleted (use either):
rclone --min-size 100M lsl remote:path
rclone --dry-run --min-size 100M delete remote:path
Then delete
Then proceed with the actual delete:
rclone --min-size 100M delete remote:path