rclone/docs/content/commands/rclone_ncdu.md

130 lines
5.6 KiB
Markdown
Raw Normal View History

---
title: "rclone ncdu"
description: "Explore a remote with a text based user interface."
2022-12-21 01:16:14 +08:00
versionIntroduced: v1.37
# autogenerated - DO NOT EDIT, instead edit the source code in cmd/ncdu/ and as part of making a release run "make commanddocs"
---
# rclone ncdu
Explore a remote with a text based user interface.
## Synopsis
This displays a text based user interface allowing the navigation of a
remote. It is most useful for answering the question - "What is using
all my disk space?".
{{< asciinema 157793 >}}
2018-03-19 18:06:13 +08:00
To make the user interface it first scans the entire remote given and
builds an in memory representation. rclone ncdu can be used during
this scanning phase and you will see it building up the directory
structure as it goes along.
2022-07-10 01:08:20 +08:00
You can interact with the user interface using key presses,
press '?' to toggle the help on and off. The supported keys are:
↑,↓ or k,j to Move
→,l to enter
←,h to return
g toggle graph
2022-12-21 01:16:14 +08:00
c toggle counts
2021-02-02 21:42:35 +08:00
a toggle average size in directory
2022-12-21 01:16:14 +08:00
m toggle modified time
2021-11-01 23:42:05 +08:00
u toggle human-readable format
2022-12-21 01:16:14 +08:00
n,s,C,A,M sort by name,size,count,asize,mtime
2018-11-24 21:44:25 +08:00
d delete file/directory
2022-07-10 01:08:20 +08:00
v select file/directory
V enter visual select mode
D delete selected files/directories
2021-07-21 02:45:41 +08:00
y copy current path to clipboard
2019-08-26 22:25:20 +08:00
Y display current path
2022-07-10 01:08:20 +08:00
^L refresh screen (fix screen corruption)
2023-09-11 22:59:44 +08:00
r recalculate file sizes
? to toggle help on and off
2024-06-14 23:04:51 +08:00
ESC to close the menu box
q/^c to quit
2022-07-10 01:08:20 +08:00
Listed files/directories may be prefixed by a one-character flag,
2022-10-21 22:06:08 +08:00
some of them combined with a description in brackets at end of line.
2022-07-10 01:08:20 +08:00
These flags have the following meaning:
e means this is an empty directory, i.e. contains no files (but
may contain empty subdirectories)
~ means this is a directory where some of the files (possibly in
subdirectories) have unknown size, and therefore the directory
size may be underestimated (and average size inaccurate, as it
is average of the files with known sizes).
. means an error occurred while reading a subdirectory, and
therefore the directory size may be underestimated (and average
size inaccurate)
! means an error occurred while reading this directory
This an homage to the [ncdu tool](https://dev.yorhel.nl/ncdu) but for
2018-11-24 21:44:25 +08:00
rclone remotes. It is missing lots of features at the moment
2024-09-08 23:21:56 +08:00
but is useful as it stands. Unlike ncdu it does not show excluded files.
2018-11-24 21:44:25 +08:00
2022-07-10 01:08:20 +08:00
Note that it might take some time to delete big files/directories. The
2018-11-24 21:44:25 +08:00
UI won't respond in the meantime since the deletion is done synchronously.
2022-07-10 01:08:20 +08:00
For a non-interactive listing of the remote, see the
[tree](/commands/rclone_tree/) command. To just get the total size of
the remote you can also use the [size](/commands/rclone_size/) command.
```
2017-09-30 21:19:47 +08:00
rclone ncdu remote:path [flags]
```
## Options
2017-09-30 21:19:47 +08:00
```
-h, --help help for ncdu
```
2024-09-08 23:21:56 +08:00
Options shared with other commands are described next.
See the [global flags page](/flags/) for global options not listed here.
2023-08-02 17:02:38 +08:00
2024-09-08 23:21:56 +08:00
### Filter Options
2023-08-02 17:02:38 +08:00
2024-09-08 23:21:56 +08:00
Flags for filtering directory listings
2023-08-02 17:02:38 +08:00
```
--delete-excluded Delete files on dest excluded from sync
--exclude stringArray Exclude files matching pattern
--exclude-from stringArray Read file exclude patterns from file (use - to read from stdin)
--exclude-if-present stringArray Exclude directories if filename is present
--files-from stringArray Read list of source-file names from file (use - to read from stdin)
--files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin)
-f, --filter stringArray Add a file filtering rule
--filter-from stringArray Read file filtering patterns from a file (use - to read from stdin)
--ignore-case Ignore case in filters (case insensitive)
--include stringArray Include files matching pattern
--include-from stringArray Read file include patterns from file (use - to read from stdin)
--max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--max-depth int If set limits the recursion depth to this (default -1)
--max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
--metadata-exclude stringArray Exclude metadatas matching pattern
--metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin)
--metadata-filter stringArray Add a metadata filtering rule
--metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin)
--metadata-include stringArray Include metadatas matching pattern
--metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin)
--min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
--min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
```
2024-09-08 23:21:56 +08:00
### Listing Options
2023-08-02 17:02:38 +08:00
2024-09-08 23:21:56 +08:00
Flags for listing directories
2023-08-02 17:02:38 +08:00
```
--default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
--fast-list Use recursive list if available; uses more memory but fewer transactions
```
2024-09-08 23:21:56 +08:00
## See Also
2018-10-15 18:03:08 +08:00
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
2018-03-19 18:06:13 +08:00