ncdc 1.5 and ncdu 1.8 released + minor changes

This commit is contained in:
Yorhel 2011-11-03 13:32:32 +01:00
parent 399409e038
commit 11b3f1be5a
5 changed files with 128 additions and 78 deletions

View file

@ -1,3 +1,13 @@
1.5 - 2011-11-03
- Added filelist_maxage setting
- Added flush_file_cache setting
- Added /ungrant and improved /grant management
- Added key to download queue to clear user state for all files
- Added keys to search results to download file list and match queue
- Select the right user when using the 'q' key in connection tab
- Fixed possible crash when opening file list from search results
- Fixed detection of incompatible session directory version
1.4 - 2011-10-26 1.4 - 2011-10-26
- Added sorting functionality to file list - Added sorting functionality to file list
- Added color settings: title, separator, list_default, list_header and list_select - Added color settings: title, separator, list_default, list_header and list_select

View file

@ -139,11 +139,17 @@ INTERACTIVE COMMANDS
This command may take some time to complete, and will fully block ncdc This command may take some time to complete, and will fully block ncdc
while it is running. You won't have to perform this command very often. while it is running. You won't have to perform this command very often.
/grant [<user>] /grant [-list|<user>]
Grant someone a slot. This allows the user to download from you even if Grant someone a slot. This allows the user to download from you even if
you have no free slots. The slot will be granted for as long as ncdc you have no free slots. The slot will be granted for as long as ncdc
stays open. If you restart ncdc, the user will have to wait for a regular stays open or the /ungrant command is used. If you restart ncdc, the user
slot. Unless, of course, you /grant a slot again. will have to wait for a regular slot. Unless, of course, you /grant a
slot again.
To get a list of users whom you have granted a slot, use `/grant' without
arguments or with `-list'. Be warned that using `/grant' without argu
ments on a PM tab will grant the slot to the user you are talking with.
Make sure to use `-all' in that case.
Note that a granted slot is specific to a single hub. If the same user is Note that a granted slot is specific to a single hub. If the same user is
also on other hubs, he/she will not be granted a slot on those hubs. also on other hubs, he/she will not be granted a slot on those hubs.
@ -269,6 +275,9 @@ INTERACTIVE COMMANDS
name you give it will be public. An initial `/refresh' is done automati name you give it will be public. An initial `/refresh' is done automati
cally on the added directory. cally on the added directory.
/ungrant [<username>|<id>]
Revoke a granted slot.
/unset [<key>] /unset [<key>]
This command can be used to reset a configuration variable back to its This command can be used to reset a configuration variable back to its
default value. default value.
@ -427,6 +436,24 @@ SETTINGS
KOI8-R (Cyrillic) KOI8-R (Cyrillic)
UTF-8 (International) UTF-8 (International)
filelist_maxage <interval>
The maximum age of a downloaded file list. If a file list was downloaded
longer ago than the configured interval, it will be removed from the
cache (the fl/ directory) and subsequent requests to open the file list
will result in the list being downloaded from the user again. Recognized
suffices are 's' for seconds, 'm' for minutes, 'h' for hours and 'd' for
days. Set to 0 to disable the cache altogether.
flush_file_cache <boolean>
Tell the OS to flush the file (disk) cache for file contents read while
hashing and uploading. On one hand, this will avoid trashing your disk
cache with large files and thus improve the overall responsiveness of
your system. On the other hand, ncdc may purge any shared files from the
cache, even if they are still used by other applications. In general, it
is a good idea to enable this if you also use your system for other
things besides ncdc, you share large files (>100MB) and people are not
constantly downloading the same file from you.
hubname <string> hubname <string>
The name of the currently opened hub tab. This is a user-assigned name, The name of the currently opened hub tab. This is a user-assigned name,
and is only used within ncdc itself. This is the same name as given to and is only used within ncdc itself. This is the same name as given to
@ -595,7 +622,8 @@ KEY BINDINGS
i/Return Toggle user list. i/Return Toggle user list.
r Remove selected user for this file. r Remove selected user for this file.
R Remove selected user from all files in the download queue. R Remove selected user from all files in the download queue.
x Clear error state for the selected user. x Clear error state for the selected user for this file.
X Clear error state for the selected user for all files.
Note: when an item in the queue has `ERR' indicated in the priority col Note: when an item in the queue has `ERR' indicated in the priority col
umn, you have two choices: You can remove the item from the queue using umn, you have two choices: You can remove the item from the queue using
@ -609,6 +637,7 @@ KEY BINDINGS
End/Home Select last/first item in the list. End/Home Select last/first item in the list.
f Find user in user list. f Find user in user list.
b/B Browse the selected users' list, B to force a redownload. b/B Browse the selected users' list, B to force a redownload.
d Add selected file to the download queue.
h Toggle hub column visibility. h Toggle hub column visibility.
u Order by username. u Order by username.
s Order by file size. s Order by file size.
@ -616,6 +645,8 @@ KEY BINDINGS
n Order by file name. n Order by file name.
m Match selected item with the download queue. m Match selected item with the download queue.
M Match all search results with the download queue. M Match all search results with the download queue.
q Match selected users' list with the download queue.
Q Match all matched users' lists with the download queue.
a Search for alternative download sources. a Search for alternative download sources.
User list tab User list tab
@ -670,7 +701,8 @@ FILES
$NCDC_DIR/fl/ $NCDC_DIR/fl/
Directory where downloaded file lists from other users are stored. The Directory where downloaded file lists from other users are stored. The
names of the files are hex-encoded user IDs that are used internally by names of the files are hex-encoded user IDs that are used internally by
ncdc. Old file lists are deleted automatically after one week. ncdc. Old file lists are deleted automatically after a configurable
interval. See the `filelist_maxage' configuration option.
$NCDC_DIR/hashdata.dat $NCDC_DIR/hashdata.dat
File information and hash data for shared files. File information and hash data for shared files.
@ -679,17 +711,17 @@ FILES
Command history. Command history.
$NCDC_DIR/inc/ $NCDC_DIR/inc/
Default location for incomplete downloads. Can be changed with the Default location for incomplete downloads. Can be changed with the
`incoming_dir' setting. The file names in this directory are the `incoming_dir' setting. The file names in this directory are the
base32-encoded TTH root of the completed file. base32-encoded TTH root of the completed file.
$NCDC_DIR/logs/ $NCDC_DIR/logs/
Directory where all the log files are stored. File names starting with Directory where all the log files are stored. File names starting with
`#' are hub logs and `~' are user (PM) logs. Special log files are trans `#' are hub logs and `~' are user (PM) logs. Special log files are trans
fers.log and main.log. fers.log and main.log.
ncdc does not have built-in functionality to rotate or compress log files ncdc does not have built-in functionality to rotate or compress log files
automatically. When rotating log files manually (e.g. via a cron job), automatically. When rotating log files manually (e.g. via a cron job),
make sure to send the SIGUSR1 signal afterwards to force ncdc to flush make sure to send the SIGUSR1 signal afterwards to force ncdc to flush
the old logs and create or open the new log files. the old logs and create or open the new log files.
$NCDC_DIR/stderr.log $NCDC_DIR/stderr.log
@ -697,7 +729,7 @@ FILES
$NCDC_DIR/version $NCDC_DIR/version
Version of the data directory. This file locked while an ncdc instance is Version of the data directory. This file locked while an ncdc instance is
running, making sure that no two ncdc instances work with the same ses running, making sure that no two ncdc instances work with the same ses
sion directory at the same time. sion directory at the same time.
@ -708,7 +740,7 @@ LICENSE
BUGS BUGS
Please report bugs or feature requests to projects@yorhel.nl or connect to the Please report bugs or feature requests to projects@yorhel.nl or connect to the
development hub at adc://dc.blicky.net:2780/. development hub at adc://dc.blicky.net:2780/.
@ -722,4 +754,4 @@ SEE ALSO
ncdc-1.4 October 2011 ncdc(1) ncdc-1.5 November 2011 ncdc(1)

View file

@ -1,3 +1,8 @@
1.8 - 2011-11-03
- Use hash table to speed up hard link detection
- Added read-only option (-r)
- Use KiB instead of kiB (#3399279
1.7 - 2010-08-13 1.7 - 2010-08-13
- List the detected hard links in file info window - List the detected hard links in file info window
- Count the size of a hard linked file once for each directory it appears in - Count the size of a hard linked file once for each directory it appears in

View file

@ -1,4 +1,4 @@
ncdu(1) ncdu manual ncdu(1) ncdu(1) ncdu manual ncdu(1)
@ -11,31 +11,32 @@ SYNOPSIS
DESCRIPTION DESCRIPTION
ncdu (NCurses Disk Usage) is a curses-based version of the well-known ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du', and
'du', and provides a fast way to see what directories are using your provides a fast way to see what directories are using your disk space.
disk space.
OPTIONS OPTIONS
-h Print a small help message -h Print a small help message
-q Quiet mode. While calculating disk space, ncdu will update the -q Quiet mode. While calculating disk space, ncdu will update the screen 10
screen 10 times a second by default, this will be decreased to times a second by default, this will be decreased to once every 2 seconds
once every 2 seconds in quiet mode. Use this feature to save in quiet mode. Use this feature to save bandwidth over remote connec
bandwidth over remote connections. tions.
-r Read-only mode. This will disable the built-in file deletion feature.
-v Print version. -v Print version.
-x Only count files and directories on the same filesystem as the -x Only count files and directories on the same filesystem as the specified
specified dir. dir.
--exclude PATTERN --exclude PATTERN
Exclude files that match PATTERN. This argument can be added Exclude files that match PATTERN. This argument can be added multiple
multiple times to add more patterns. times to add more patterns.
-X FILE, --exclude-from FILE -X FILE, --exclude-from FILE
Exclude files that match any pattern in FILE. Patterns should be Exclude files that match any pattern in FILE. Patterns should be sepa
separated by a newline. rated by a newline.
KEYS KEYS
@ -56,22 +57,21 @@ KEYS
a Toggle between showing disk usage and showing apparent size. a Toggle between showing disk usage and showing apparent size.
d Delete the selected file or directory. An error message will be d Delete the selected file or directory. An error message will be shown
shown when the contents of the directory do not match or do not when the contents of the directory do not match or do not exist anymore
exist anymore on the filesystem. on the filesystem.
t Toggle dirs before files when sorting. t Toggle dirs before files when sorting.
g Toggle between showing percentage, graph, both, or none. Per- g Toggle between showing percentage, graph, both, or none. Percentage is
centage is relative to the size of the current directory, graph relative to the size of the current directory, graph is relative to the
is relative to the largest item in the current directory. largest item in the current directory.
e Show/hide 'hidden' or 'excluded' files and directories. Please e Show/hide 'hidden' or 'excluded' files and directories. Please note that
note that even though you can't see the hidden files and direc- even though you can't see the hidden files and directories, they are
tories, they are still there and they are still included in the still there and they are still included in the directory sizes. If you
directory sizes. If you suspect that the totals shown at the suspect that the totals shown at the bottom of the screen are not cor
bottom of the screen are not correct, make sure you haven't rect, make sure you haven't enabled this option.
enabled this option.
i Show information about the current selected item. i Show information about the current selected item.
@ -81,46 +81,44 @@ KEYS
HARD LINKS HARD LINKS
Every disk usage analysis utility has its own way of (not) counting Every disk usage analysis utility has its own way of (not) counting hard links.
hard links. There does not seem to be any universally agreed method of There does not seem to be any universally agreed method of handling hard links,
handling hard links, and it is even inconsistent among different ver- and it is even inconsistent among different versions of ncdu. This section
sions of ncdu. This section explains what each version of ncdu does. explains what each version of ncdu does.
ncdu 1.5 and below does not support any hard link detection at all: ncdu 1.5 and below does not support any hard link detection at all: each link is
each link is considered a separate inode and its size is counted for considered a separate inode and its size is counted for every link. This means
every link. This means that the displayed directory sizes are incorrect that the displayed directory sizes are incorrect when analyzing directories
when analyzing directories which contain hard links. which contain hard links.
ncdu 1.6 has basic hard link detection: When a link to a previously ncdu 1.6 has basic hard link detection: When a link to a previously encountered
encountered inode is detected, the link is considered to have a file inode is detected, the link is considered to have a file size of zero bytes.
size of zero bytes. Its size is not counted again, and the link is Its size is not counted again, and the link is indicated in the browser inter
indicated in the browser interface with a 'H' mark. The displayed face with a 'H' mark. The displayed directory sizes are only correct when all
directory sizes are only correct when all links to an inode reside links to an inode reside within that directory. When this is not the case, the
within that directory. When this is not the case, the sizes may or may sizes may or may not be correct, depending on which links were considered as
not be correct, depending on which links were considered as "duplicate" "duplicate" and which as "original". The indicated size of the topmost directory
and which as "original". The indicated size of the topmost directory (that is, the one specified on the command line upon starting ncdu) is always
(that is, the one specified on the command line upon starting ncdu) is correct.
always correct.
ncdu 1.7 has improved hard link detection. Each file that has more than ncdu 1.7 has improved hard link detection. Each file that has more than two
two links has the "H" mark visible in the browser interface. Each hard links has the "H" mark visible in the browser interface. Each hard link is
link is counted exactly once for every directory it appears in. The counted exactly once for every directory it appears in. The indicated size of
indicated size of each directory is therefore, correctly, the sum of each directory is therefore, correctly, the sum of the sizes of all unique
the sizes of all unique inodes that can be found in that directory. inodes that can be found in that directory. Note, however, that this may not
Note, however, that this may not always be same as the space that will always be same as the space that will be reclaimed after deleting the directory,
be reclaimed after deleting the directory, as some inodes may still be as some inodes may still be accessible from hard links outside it.
accessible from hard links outside it.
BUGS BUGS
Directory hard links are not supported. They will not be detected as Directory hard links are not supported. They will not be detected as being hard
being hard links, and will thus be scanned and counted multiple times. links, and will thus be scanned and counted multiple times.
Some minor glitches may appear when displaying filenames that contain Some minor glitches may appear when displaying filenames that contain multibyte
multibyte or multicolumn characters. or multicolumn characters.
Please report any other bugs you may find at the bug tracker, which can Please report any other bugs you may find at the bug tracker, which can be found
be found on the web site at http://dev.yorhel.nl/ncdu on the web site at http://dev.yorhel.nl/ncdu
AUTHOR AUTHOR
@ -132,4 +130,4 @@ SEE ALSO
ncdu-1.7 Aug 13, 2010 ncdu(1) ncdu-1.8 Nov 3, 2011 ncdu(1)

View file

@ -53,6 +53,7 @@ sub home {
E; E;
end; end;
h2 'Updates'; h2 'Updates';
b '2011-11-03'; txt ' ncdc 1.5 and ncdu 1.8 released!'; br;
b '2011-10-26'; txt ' ncdc 1.4 released!'; br; b '2011-10-26'; txt ' ncdc 1.4 released!'; br;
b '2011-10-19'; txt ' PGP-signed all releases of ncdu, ncdc and TUWF.'; br; b '2011-10-19'; txt ' PGP-signed all releases of ncdu, ncdc and TUWF.'; br;
b '2011-10-14'; txt ' ncdc 1.3 released!'; br; b '2011-10-14'; txt ' ncdc 1.3 released!'; br;
@ -102,8 +103,8 @@ sub ncdu {
E; E;
br; br; br; br;
b 'Latest version: '; b 'Latest version: ';
txt '1.7 ('; txt '1.8 (';
$s->htmlDLLink('ncdu-1.7.tar.gz', 'download'); $s->htmlDLLink('ncdu-1.8.tar.gz', 'download');
txt ' - '; txt ' - ';
a href => '/ncdu/changes', 'changes'; a href => '/ncdu/changes', 'changes';
txt ' - '; txt ' - ';
@ -141,7 +142,7 @@ sub ncdu {
br; br; br; br;
txt 'Subscribe to '; txt 'Subscribe to ';
a href => 'http://freshmeat.net/projects/ncdu', 'freshmeat'; a href => 'http://freecode.com/projects/ncdu', 'freecode';
txt ' or to '; txt ' or to ';
a href => 'https://sourceforge.net/api/file/index/project-id/200175/mtime/desc/rss', 'this RSS feed at sf.net'; a href => 'https://sourceforge.net/api/file/index/project-id/200175/mtime/desc/rss', 'this RSS feed at sf.net';
txt ' to receive notifications for new releases.'; txt ' to receive notifications for new releases.';
@ -187,6 +188,8 @@ sub ncduscr {
my $s = shift; my $s = shift;
$s->htmlHeader(title => 'Screenshots', page => 'ncdu', tab => 'scr'); $s->htmlHeader(title => 'Screenshots', page => 'ncdu', tab => 'scr');
p; p;
txt 'Note: While these screenshots are from version 1.7, the latest version has only little visible changes.';
br; br;
txt 'Scanning...'; txt 'Scanning...';
img src => '/img/ncduscan.png', style => 'margin: 5px 0 0 0; border: 1px solid #999', alt => 'Ncdu scanning a large directory.'; img src => '/img/ncduscan.png', style => 'margin: 5px 0 0 0; border: 1px solid #999', alt => 'Ncdu scanning a large directory.';
br;br; br;br;
@ -227,8 +230,8 @@ sub ncdc {
h2 'Get ncdc!'; h2 'Get ncdc!';
p; p;
b 'Latest version:'; txt ' 1.4 ('; b 'Latest version:'; txt ' 1.5 (';
$s->htmlDLLink('ncdc-1.4.tar.gz', 'download'); $s->htmlDLLink('ncdc-1.5.tar.gz', 'download');
txt ' - '; a href => '/ncdc/changes', 'changes'; txt ' - '; a href => '/ncdc/changes', 'changes';
txt ' - '; a href => 'https://sourceforge.net/projects/ncdc/files/ncdc/', 'mirror'; txt ' - '; a href => 'https://sourceforge.net/projects/ncdc/files/ncdc/', 'mirror';
txt ')'; br; txt ')'; br;
@ -291,8 +294,8 @@ sub ncdc {
may have all of these installed already.<br /> may have all of these installed already.<br />
Ncdc has been developed on Arch Linux, but I have received reports from Ncdc has been developed on Arch Linux, but I have received reports from
people who successfully used it on CentOS, Debian, FreeBSD, Gentoo, Mac OS people who successfully used it on CentOS, Debian, FreeBSD, Gentoo, Mac OS
X, Solaris and Ubuntu. It should be fairly trivial to port to other X, OpenSUSE, Solaris and Ubuntu. It should be fairly trivial to port to
POSIX-like systems.<br /> other POSIX-like systems.<br />
Ncdc is entirely written in C and available under a liberal MIT license. Ncdc is entirely written in C and available under a liberal MIT license.
E; E;
end; end;
@ -969,6 +972,8 @@ sub htmlFooter {
a href => 'http://g.blicky.net', 'git'; a href => 'http://g.blicky.net', 'git';
txt ' - '; txt ' - ';
a href => 'http://svn.blicky.net', 'svn'; a href => 'http://svn.blicky.net', 'svn';
txt ' - ';
a href => 'http://pgp.mit.edu:11371/pks/lookup?search=0x8c2739fa', 'pgp';
end; end;
end 'body'; end 'body';
end 'html'; end 'html';