mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-14 01:38:41 -09:00
Man page updates
Haven't mentioned the new -O flag in the examples section yet. Let's first keep it as a slightly lower-profile feature while the format gains wider testing and adoption.
This commit is contained in:
parent
39517c01a8
commit
e142d012f0
1 changed files with 46 additions and 5 deletions
51
ncdu.1
51
ncdu.1
|
|
@ -6,6 +6,7 @@
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm ncdu
|
.Nm ncdu
|
||||||
.Nd NCurses Disk Usage
|
.Nd NCurses Disk Usage
|
||||||
|
.
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl f Ar file
|
.Op Fl f Ar file
|
||||||
|
|
@ -45,11 +46,13 @@
|
||||||
.Op Fl h , \-help
|
.Op Fl h , \-help
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl v , V , \-version
|
.Op Fl v , V , \-version
|
||||||
|
.
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
(NCurses Disk Usage) is an interactive curses-based version of the well-known
|
(NCurses Disk Usage) is an interactive curses-based version of the well-known
|
||||||
.Xr du 1 ,
|
.Xr du 1 ,
|
||||||
and provides a fast way to see what directories are using your disk space.
|
and provides a fast way to see what directories are using your disk space.
|
||||||
|
.
|
||||||
.Sh OPTIONS
|
.Sh OPTIONS
|
||||||
.Ss Mode Selection
|
.Ss Mode Selection
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
|
|
@ -60,10 +63,13 @@ Print version and quit.
|
||||||
.It Fl f Ar file
|
.It Fl f Ar file
|
||||||
Load the given file, which has earlier been created with the
|
Load the given file, which has earlier been created with the
|
||||||
.Fl o
|
.Fl o
|
||||||
|
or
|
||||||
|
.Fl O
|
||||||
flag.
|
flag.
|
||||||
If
|
If
|
||||||
.Ar file
|
.Ar file
|
||||||
is equivalent to '\-', the file is read from standard input.
|
is equivalent to '\-', the file is read from standard input.
|
||||||
|
Reading from standard input is only supported for the JSON format.
|
||||||
.Pp
|
.Pp
|
||||||
For the sake of preventing a screw-up, the current version of
|
For the sake of preventing a screw-up, the current version of
|
||||||
.Nm
|
.Nm
|
||||||
|
|
@ -74,7 +80,7 @@ will be disabled.
|
||||||
.It Ar dir
|
.It Ar dir
|
||||||
Scan the given directory.
|
Scan the given directory.
|
||||||
.It Fl o Ar file
|
.It Fl o Ar file
|
||||||
Export all necessary information to
|
Export the directory tree in JSON format to
|
||||||
.Ar file
|
.Ar file
|
||||||
instead of opening the browser interface.
|
instead of opening the browser interface.
|
||||||
If
|
If
|
||||||
|
|
@ -88,6 +94,22 @@ directory with many files.
|
||||||
uncompressed, or a little over 100 KiB when compressed with gzip.
|
uncompressed, or a little over 100 KiB when compressed with gzip.
|
||||||
This scales linearly, so be prepared to handle a few tens of megabytes when
|
This scales linearly, so be prepared to handle a few tens of megabytes when
|
||||||
dealing with millions of files.
|
dealing with millions of files.
|
||||||
|
.Pp
|
||||||
|
When running a multi-threaded scan or when scanning a directory tree that may
|
||||||
|
not fit in memory, consider using
|
||||||
|
.Fl O
|
||||||
|
instead.
|
||||||
|
.It Fl O Ar file
|
||||||
|
Export the directory tree in binary format to
|
||||||
|
.Ar file
|
||||||
|
instead of opening the browser interface.
|
||||||
|
If
|
||||||
|
.Ar file
|
||||||
|
is '\-', the data is written to standard output.
|
||||||
|
The binary format has built-in compression, supports low-memory multi-threaded
|
||||||
|
export (in combination with
|
||||||
|
.Fl t )
|
||||||
|
and can be browsed without importing the entire directory tree into memory.
|
||||||
.It Fl e , \-extended , \-no\-extended
|
.It Fl e , \-extended , \-no\-extended
|
||||||
Enable/disable extended information mode.
|
Enable/disable extended information mode.
|
||||||
This will, in addition to the usual file information, also read the ownership,
|
This will, in addition to the usual file information, also read the ownership,
|
||||||
|
|
@ -106,6 +128,7 @@ using 'm' and 'M', respectively.
|
||||||
.It Fl \-ignore\-config
|
.It Fl \-ignore\-config
|
||||||
Do not attempt to load any configuration files.
|
Do not attempt to load any configuration files.
|
||||||
.El
|
.El
|
||||||
|
.
|
||||||
.Ss Scan Options
|
.Ss Scan Options
|
||||||
These options affect the scanning progress, they have no effect when importing
|
These options affect the scanning progress, they have no effect when importing
|
||||||
directory information from a file.
|
directory information from a file.
|
||||||
|
|
@ -149,16 +172,27 @@ The exact counting behavior of this flag is subject to change in the future.
|
||||||
The complete list of currently known pseudo filesystems is: binfmt, bpf, cgroup,
|
The complete list of currently known pseudo filesystems is: binfmt, bpf, cgroup,
|
||||||
cgroup2, debug, devpts, proc, pstore, security, selinux, sys, trace.
|
cgroup2, debug, devpts, proc, pstore, security, selinux, sys, trace.
|
||||||
.It Fl t , \-threads Ar num
|
.It Fl t , \-threads Ar num
|
||||||
Number of threads to use when scanning the filesystem, currently defaults to 1.
|
Number of threads to use when scanning the filesystem, defaults to 1.
|
||||||
.Pp
|
.Pp
|
||||||
In single-threaded mode, the export function (see
|
In single-threaded mode, the JSON export (see
|
||||||
.Fl o )
|
.Fl o )
|
||||||
can operate with very little memory, but in multi-threaded mode the entire
|
can operate with very little memory, but in multi-threaded mode the entire
|
||||||
directory tree is first constructed in memory and written out after the
|
directory tree is first constructed in memory and written out after the
|
||||||
filesystem scan has completed,
|
filesystem scan has completed,
|
||||||
This causes a delay in output and requires significantly more memory for large
|
This causes a delay in output and requires significantly more memory for large
|
||||||
directory trees.
|
directory trees.
|
||||||
|
The binary format (see
|
||||||
|
.Fl O )
|
||||||
|
does not have this problem and supports efficient exporting with any number of
|
||||||
|
threads.
|
||||||
|
.It Fl \-compress\-level Ar num
|
||||||
|
Set the Zstandard compression level when using
|
||||||
|
.Fl O
|
||||||
|
to create a binary export.
|
||||||
|
Valid values are 1 (fastest) to 19 (slowest).
|
||||||
|
Defaults to 4.
|
||||||
.El
|
.El
|
||||||
|
.
|
||||||
.Ss Interface Options
|
.Ss Interface Options
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl 0
|
.It Fl 0
|
||||||
|
|
@ -307,6 +341,7 @@ color scheme that also works in terminals with a light background.
|
||||||
The default is
|
The default is
|
||||||
.Ar off .
|
.Ar off .
|
||||||
.El
|
.El
|
||||||
|
.
|
||||||
.Sh CONFIGURATION
|
.Sh CONFIGURATION
|
||||||
.Nm
|
.Nm
|
||||||
can be configured by placing command-line options in
|
can be configured by placing command-line options in
|
||||||
|
|
@ -335,6 +370,7 @@ Example configuration file:
|
||||||
# Exclude .git directories
|
# Exclude .git directories
|
||||||
\-\-exclude .git
|
\-\-exclude .git
|
||||||
.Ed
|
.Ed
|
||||||
|
.
|
||||||
.Sh KEYS
|
.Sh KEYS
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It ?
|
.It ?
|
||||||
|
|
@ -421,6 +457,7 @@ itself does not (currently) warn about or prevent this situation.
|
||||||
.It q
|
.It q
|
||||||
Quit
|
Quit
|
||||||
.El
|
.El
|
||||||
|
.
|
||||||
.Sh FILE FLAGS
|
.Sh FILE FLAGS
|
||||||
Entries in the browser interface may be prefixed by a one\-character flag.
|
Entries in the browser interface may be prefixed by a one\-character flag.
|
||||||
These flags have the following meaning:
|
These flags have the following meaning:
|
||||||
|
|
@ -444,6 +481,7 @@ Same file was already counted (hard link).
|
||||||
.It e
|
.It e
|
||||||
Empty directory.
|
Empty directory.
|
||||||
.El
|
.El
|
||||||
|
.
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
To scan and browse the directory you're currently in, all you need is a simple:
|
To scan and browse the directory you're currently in, all you need is a simple:
|
||||||
.Dl ncdu
|
.Dl ncdu
|
||||||
|
|
@ -483,6 +521,7 @@ the local system without any network latency, and
|
||||||
.Nm
|
.Nm
|
||||||
does not keep the entire directory structure in memory when exporting, so this
|
does not keep the entire directory structure in memory when exporting, so this
|
||||||
won't consume much memory on the remote system.
|
won't consume much memory on the remote system.
|
||||||
|
.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr du 1 ,
|
.Xr du 1 ,
|
||||||
.Xr tree 1 .
|
.Xr tree 1 .
|
||||||
|
|
@ -490,13 +529,15 @@ won't consume much memory on the remote system.
|
||||||
.Nm
|
.Nm
|
||||||
has a website:
|
has a website:
|
||||||
.Lk https://dev.yorhel.nl/ncdu
|
.Lk https://dev.yorhel.nl/ncdu
|
||||||
|
.
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
Written by
|
Written by
|
||||||
.An Yorhel Aq Mt projects@yorhel.nl
|
.An Yorhel Aq Mt projects@yorhel.nl
|
||||||
|
.
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
Directory hard links and firmlinks (MacOS) are not supported.
|
Directory hard links and firmlinks (MacOS) are not supported.
|
||||||
They are not detected as being hard links, and will thus get scanned and
|
They are not detected as being hard links and will thus get scanned and counted
|
||||||
counted multiple times.
|
multiple times.
|
||||||
.Pp
|
.Pp
|
||||||
Some minor glitches may appear when displaying filenames that contain multibyte
|
Some minor glitches may appear when displaying filenames that contain multibyte
|
||||||
or multicolumn characters.
|
or multicolumn characters.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue