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

This commit is contained in:
albertony
2020-11-23 17:10:08 +00:00
committed by Nick Craig-Wood
parent fb001b6c01
commit 79474b2e4c
4 changed files with 30 additions and 17 deletions
+11 -5
View File
@@ -20,15 +20,21 @@ func init() {
var rmdirsCmd = &cobra.Command{
Use: "rmdirs remote:path",
Short: `Remove empty directories under the path.`,
Long: `This removes any empty directories (or directories that only contain
empty directories) under the path that it finds, including the path if
it has nothing in.
Long: `
This recursively removes any empty directories (including directories
that only contain empty directories), that it finds under the path.
The root path itself will also be removed if it is empty, unless
you supply the ` + "`--leave-root`" + ` flag.
If you supply the --leave-root flag, it will not remove the root directory.
Use command ` + "`rmdir`" + ` to delete just the empty directory
given by path, not recurse.
This is useful for tidying up remotes that rclone has left a lot of
empty directories in.
empty directories in. For example the ` + "`delete`" + ` command will
delete files but leave the directory structure (unless used with
option ` + "`--rmdirs`" + `).
To delete a path and any objects in it, use ` + "`purge`" + ` command.
`,
Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(1, 1, command, args)