github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/commands/rclone_tree.md (about)

     1  ---
     2  title: "rclone tree"
     3  description: "List the contents of the remote in a tree like fashion."
     4  slug: rclone_tree
     5  url: /commands/rclone_tree/
     6  groups: Filter,Listing
     7  versionIntroduced: v1.38
     8  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/tree/ and as part of making a release run "make commanddocs"
     9  ---
    10  # rclone tree
    11  
    12  List the contents of the remote in a tree like fashion.
    13  
    14  ## Synopsis
    15  
    16  
    17  rclone tree lists the contents of a remote in a similar way to the
    18  unix tree command.
    19  
    20  For example
    21  
    22      $ rclone tree remote:path
    23      /
    24      ├── file1
    25      ├── file2
    26      ├── file3
    27      └── subdir
    28          ├── file4
    29          └── file5
    30  
    31      1 directories, 5 files
    32  
    33  You can use any of the filtering options with the tree command (e.g.
    34  `--include` and `--exclude`.  You can also use `--fast-list`.
    35  
    36  The tree command has many options for controlling the listing which
    37  are compatible with the tree command, for example you can include file
    38  sizes with `--size`.  Note that not all of them have
    39  short options as they conflict with rclone's short options.
    40  
    41  For a more interactive navigation of the remote see the
    42  [ncdu](/commands/rclone_ncdu/) command.
    43  
    44  
    45  ```
    46  rclone tree remote:path [flags]
    47  ```
    48  
    49  ## Options
    50  
    51  ```
    52    -a, --all             All files are listed (list . files too)
    53    -d, --dirs-only       List directories only
    54        --dirsfirst       List directories before files (-U disables)
    55        --full-path       Print the full path prefix for each file
    56    -h, --help            help for tree
    57        --level int       Descend only level directories deep
    58    -D, --modtime         Print the date of last modification.
    59        --noindent        Don't print indentation lines
    60        --noreport        Turn off file/directory count at end of tree listing
    61    -o, --output string   Output to file instead of stdout
    62    -p, --protections     Print the protections for each file.
    63    -Q, --quote           Quote filenames with double quotes.
    64    -s, --size            Print the size in bytes of each file.
    65        --sort string     Select sort: name,version,size,mtime,ctime
    66        --sort-ctime      Sort files by last status change time
    67    -t, --sort-modtime    Sort files by last modification time
    68    -r, --sort-reverse    Reverse the order of the sort
    69    -U, --unsorted        Leave files unsorted
    70        --version         Sort files alphanumerically by version
    71  ```
    72  
    73  
    74  ## Filter Options
    75  
    76  Flags for filtering directory listings.
    77  
    78  ```
    79        --delete-excluded                     Delete files on dest excluded from sync
    80        --exclude stringArray                 Exclude files matching pattern
    81        --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
    82        --exclude-if-present stringArray      Exclude directories if filename is present
    83        --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
    84        --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
    85    -f, --filter stringArray                  Add a file filtering rule
    86        --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
    87        --ignore-case                         Ignore case in filters (case insensitive)
    88        --include stringArray                 Include files matching pattern
    89        --include-from stringArray            Read file include patterns from file (use - to read from stdin)
    90        --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
    91        --max-depth int                       If set limits the recursion depth to this (default -1)
    92        --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
    93        --metadata-exclude stringArray        Exclude metadatas matching pattern
    94        --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
    95        --metadata-filter stringArray         Add a metadata filtering rule
    96        --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
    97        --metadata-include stringArray        Include metadatas matching pattern
    98        --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
    99        --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   100        --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
   101  ```
   102  
   103  ## Listing Options
   104  
   105  Flags for listing directories.
   106  
   107  ```
   108        --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
   109        --fast-list           Use recursive list if available; uses more memory but fewer transactions
   110  ```
   111  
   112  See the [global flags page](/flags/) for global options not listed here.
   113  
   114  # SEE ALSO
   115  
   116  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
   117