ncdu 1.21 + 2.7

This commit is contained in:
Yorhel 2024-11-19 15:02:22 +01:00
parent 68bf70e0eb
commit 76b8f42f1d
32 changed files with 171 additions and 24 deletions

View file

@ -126,9 +126,9 @@ excluded
`"otherfs"` or `"othfs"`
: If the item is on a different device/filesystem. Every version of ncdu
versions recognizes `"otherfs"` when importing, but versions 1.20 or
2.4 and earlier wrote `"othfs"` when exporting. Later versions
recognize both strings and output `"otherfs"`.
versions recognizes `"otherfs"` when importing, but versions before
1.21 or 2.5 wrote `"othfs"` when exporting. Later versions recognize
both strings and output `"otherfs"`.
`"kernfs"`
: If the item has been excluded with `--exclude-kernfs` (since ncdu 1.15).
@ -187,11 +187,11 @@ mtime
As mentioned above, file/directory names are **not** converted to any specific
encoding when exporting. If you want the exported info dump to be valid JSON
(and thus valid UTF-8), you'll have to ensure that you have either no non-UTF-8
filenames in your filesystem, or you should process the dump through a
conversion utility such as `iconv`. When browsing an imported file with ncdu,
you'll usually want to ensure that the filenames are in the same encoding as
what your terminal is expecting. The browsing interface may look garbled or
(and thus valid UTF-8), you'll have to ensure that either all filenames in your
directory tree are valid UTF-8 or you should process the dump through a
conversion utility such as `iconv`. When browsing an imported file with ncdu
1.x, you'll usually want to ensure that the filenames are in the same encoding
as what your terminal is expecting. The browsing interface may look garbled or
otherwise ugly if that's not the case.
Another important thing to keep in mind is that an export can be fairly large.
@ -201,6 +201,11 @@ that. For example, prefer the use of a stream-based JSON parser over a JSON
library that reads the entire file in a single generic data structure, and only
keep the minimum amount of data that you care about in memory.
[BUG#245](https://code.blicky.net/yorhel/ncdu/issues/245): Ncdu versions before
1.21 or 2.7 did not correctly read escaped UTF-16 surrogate pairs. For
portability with these versions, unicode points above U+FFFF should be encoded
as UTF-8 instead. Ncdu itself never outputs UTF-16 surrogate pairs.
## Example Export
Here's a simple example export that displays the basic structure of the format.