321133 |
18-Jul-2017 |
ngie |
MFC r319850:
Add some initial basic tests for du(1)
Tests that exercise the following flags are added in this commit: - -A - -H - -I - -g - -h - -k - -m
Additional tests will be added soon. |
321097 |
17-Jul-2017 |
ngie |
MFC r319846:
du(1): trivial whitespace cleanup |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
242551 |
04-Nov-2012 |
joel |
New sentence, new line.
Submitted by: brueffer
|
242550 |
04-Nov-2012 |
joel |
Add a few basic examples.
|
238817 |
26-Jul-2012 |
pluknet |
Document -g option in the usage string.
|
238602 |
18-Jul-2012 |
des |
Add -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).
MFC after: 1 week
|
228669 |
17-Dec-2011 |
jilles |
du: Allow multiple -HLP options, the last one wins.
This matches 4.4BSD tradition and other utilities with these options and is required by POSIX (POSIX does not specify -P, only -HL).
MFC after: 2 weeks
|
228356 |
09-Dec-2011 |
gjb |
Update du(1):
- Sort arguments alphabetically where appropriate - '-B blocksize' is not mutually exclusive of '-h|-k|-m' - Mention '-t' in synopsis - Other wording improvements - Update usage() output to reflect the new synopsis [1] - Other miscellaneous improvements
PR: 162438 Submitted by: arundel Reviewed by: Benjamin Kaduk (kaduk ! mit.edu), jhb[1] (original version) MFC after: 1 week
|
227335 |
08-Nov-2011 |
ed |
Simplify getopt switch parsing.
Only one of these flags can be set. Just add them together and check the value. Also, get rid of the listall variable. The code is already filled with direct *flag-comparisons.
Obtained from: Alexander Best (though modified)
|
227164 |
06-Nov-2011 |
ed |
Add missing static keywords to du(1)
|
216370 |
11-Dec-2010 |
joel |
Remove the advertising clause from UCB copyrighted files in usr.bin. This is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $FreeBSD$ to a few files to keep svn happy.
Discussed with: imp, rwatson
|
210933 |
06-Aug-2010 |
joel |
Fix typos and spelling mistakes.
|
209362 |
20-Jun-2010 |
brian |
Add a -t switch for masking output that's above or below certain thresholds. This switch makes it a lot easier to locate problem areas when a process is threatening to consume all of your disk space.
PR: 144192 Submitted by: gk MFC after: 3 weeks
|
201386 |
02-Jan-2010 |
ed |
Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
|
191677 |
30-Apr-2009 |
imp |
Report the next directory being scanned when a ^T is pressed (or any SIGINFO). Provides some progress report for the impatient. This won't report that we're blocking in our walk due to disk/network problems, however. There's no really good way to report that condition that I'm aware of...
|
184742 |
07-Nov-2008 |
mlaier |
Restore (intmax_t) casts I lost during the last change & unbreak the build.
|
184733 |
06-Nov-2008 |
mlaier |
Add two new options to du(1): -A Display the apparent size instead of the disk usage. This can be helpful when operating on compressed volumes or sparse files.
-B blocksize Calculate block counts in blocksize byte blocks. This is differ- ent from the -k, -m options or setting BLOCKSIZE and gives an estimate of how much space the examined file hierachy would require on a filesystem with the given blocksize. Unless in -A mode, blocksize is rounded up to the next multiple of 512.
The former is similar to GNU's du(1) --apparent-size. The latter is different from what GNU's du(1) -B does, which is equivalent to setting BLOCKSIZE in our implementation and is rather pointless as it doesn't add any real value (i.e. you can achieve the same with a simple awk-script).
No change in the normal output or processing.
Reviewed by: keramida@, Peter French Otherwise silience from: freebsd-hackers@
|
184656 |
04-Nov-2008 |
mlaier |
Declare functions and variables static and save a few byte. This is a style(9)-change, too. Separate commit as it changes the object.
|
184654 |
04-Nov-2008 |
mlaier |
style(9): mostly avoiding line wrap by not indenting cases. No obj change.
|
176561 |
25-Feb-2008 |
keramida |
Implement from scratch a -l option for du(1), to match the same option of the GNU utility. The default behavior of our original `du' is to count hardlinked files only once for each invocation of the utility. With the new -l option they count towards the final size every time they are found.
PR: bin/117944 Submitted by: keramida Reviewed by: des, obrien MFC after: 2 weeks
|
173431 |
08-Nov-2007 |
kevlo |
setenv(3) sets errno on failure, use warn() instead
Pointed out by: ru
|
173387 |
06-Nov-2007 |
kevlo |
Check return value for setenv()
|
171195 |
04-Jul-2007 |
scf |
Significantly reduce the memory leak as noted in BUGS section for setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value.
Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT.
Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv().
New regression module for tools/regression/environ to test these functions. It also can be used to test the performance.
Bump __FreeBSD_version to 700050 due to API change.
PR: kern/99826 Approved by: wes Approved by: re (kensmith)
|
169177 |
01-May-2007 |
ache |
Back out all POSIXified *env() changes.
Not because I admit they are technically wrong and not because of bug reports (I receive nothing). But because I surprisingly meets so strong opposition and resistance so lost any desire to continue that.
Anyone who interested in POSIX can dig out what changes and how through cvs diffs.
|
169113 |
30-Apr-2007 |
ache |
Eliminate error with -W* strict flags and make putenv() calls conforming to standard and portable in the same way as f.e. gcc internal portable code does.
|
162792 |
29-Sep-2006 |
ru |
Markup fixes.
|
158339 |
06-May-2006 |
maxim |
o Implement "-n" flag: ignore files and directories with user "nodump" flag set. Useful for calculation dump -h dump size.
PR: bin/96864 Submitted by: Dmitry Kazarov Obtained from: NetBSD (man page) MFC after: 1 month
|
146466 |
21-May-2005 |
ru |
Sync program's usage() with manpage's SYNOPSIS.
|
144840 |
09-Apr-2005 |
stefanf |
Remove unused variables.
|
139813 |
07-Jan-2005 |
pjd |
Use 64bit 'fts_bignum' field instead of 32bit (on 32bit archs) field 'fts_number' to remember number of blocks. This makes du(1) 64bit-clean.
This work is part of the BigDisk project:
http://www.FreeBSD.org/projects/bigdisk/
Discussed on: arch@ MFC after: 5 days
|
136848 |
24-Oct-2004 |
keramida |
Add a missing full-stop to match the rest of the items in a list.
|
132799 |
28-Jul-2004 |
stefanf |
Use the length modifier 'll' instead of 'q' to print long longs.
|
132201 |
15-Jul-2004 |
tjr |
Respect locale settings from the environment.
|
131491 |
02-Jul-2004 |
ru |
Mechanically kill hard sentence breaks.
|
129988 |
02-Jun-2004 |
phk |
typos.
Pointed out by: ru
|
129986 |
02-Jun-2004 |
phk |
Give du(1) a -m option to report in megabytes.
Submitted by: Vasily Korytov <deskpot@msk.yell.ru> PR: 66976
|
129678 |
24-May-2004 |
pjd |
Use humanize_number(3) to format sizes into a human readable form.
|
129676 |
24-May-2004 |
pjd |
Mark du(1) as WARNS6 clean.
Tested on: alpha, amd64, i386, ia64, sparc64
|
128834 |
02-May-2004 |
kientzle |
More style fixes, per bde.
|
128806 |
01-May-2004 |
kientzle |
Style fixes, most suggested by bde.
|
128772 |
30-Apr-2004 |
kientzle |
Speed up hardlink detection by using a self-sizing hash table rather than the old linear list search.
On my "hardlink detection torture test", this reduced user time from 4700 seconds down to 4.2 seconds and wallclock time from 1:24:48 down to 1:08. (Yes, that's over one THOUSAND times reduction in user time. ;-) In the worst case, the new code doubles peak memory usage, though it could actually reduce memory usage in many cases.
MFC after: 1 week PR: misc/42167, bin/51151
|
112855 |
30-Mar-2003 |
obrien |
-{h,k} are mutually exclisive. So only pay attention to the last of the two when both are given.
|
108453 |
30-Dec-2002 |
mike |
Back out rev 1.27; getbsize(3)'s original interface has been restored.
Approved by: markm
|
107788 |
12-Dec-2002 |
ru |
Uniformly refer to a file system as "file system".
Approved by: re
|
105814 |
23-Oct-2002 |
markm |
Change the type of an unused variable to appease a warning.
|
100822 |
28-Jul-2002 |
dwmalone |
ANSIify function definitions to avoid a warning.
|
99112 |
30-Jun-2002 |
obrien |
Consistently use FBSDID
|
96704 |
16-May-2002 |
trhodes |
More consistancy. file system > filesystem
|
95083 |
19-Apr-2002 |
charnier |
Use `The .Nm utility'
|
92920 |
22-Mar-2002 |
imp |
remove __P
|
90415 |
08-Feb-2002 |
markm |
Remove leaf node WARNS?=2 (that mainly I added). This should help the GCC3 transition and CURRENT in general.
|
90389 |
08-Feb-2002 |
peter |
GRR. This was not WARNS=2 clean. You cannot printf a 'long' with '%qd'.
usr.bin/du/du.c:288: warning: long long int format, long int arg (arg 2)
Pointy hat to: markm
|
87216 |
02-Dec-2001 |
markm |
WARNS=2 fixup
|
82947 |
04-Sep-2001 |
robert |
Use the correct blocksize when invoked with both -h and -k options.
PR: 30275 Reviewed by: jake
|
81462 |
10-Aug-2001 |
ru |
mdoc(7) police: join split punctuation to macro calls.
|
79755 |
15-Jul-2001 |
dd |
Remove whitespace at EOL.
|
78158 |
13-Jun-2001 |
roam |
Add '-I mask' cmdline flag to ignore/skip files and subdirectories matching a specified shell-glob mask.
Reviewed by: no serious objections on -arch and -audit over the last few months MFC after: 1 month
|
77160 |
25-May-2001 |
ru |
Make it clear that -P is the default.
PR: docs/27629
|
68963 |
20-Nov-2000 |
ru |
mdoc(7) police: use the new features of the Nm macro.
|
67202 |
16-Oct-2000 |
ru |
Backed out part of the revision 1.10. BLOCKSIZE could specify arbitrary block sizes, not exactly 1K blocks.
|
58670 |
27-Mar-2000 |
bde |
Fixed LDADD. Using ${LIBM} instead of -lm gave the wrong libm in most cases and broke the world in some cases.
Fixed style bugs for DPADD and LDADD (don't use += for variables defined only once).
|
58601 |
26-Mar-2000 |
charnier |
Use warnx(), -Wall cleaning and remove unused #include Better use of .Nm and .Ar
|
58522 |
24-Mar-2000 |
mharo |
fix bug with du -hd
Submitted by: dcs
|
57695 |
02-Mar-2000 |
sheldonh |
Remove more single-space hard sentence breaks.
|
57670 |
01-Mar-2000 |
sheldonh |
Remove single-space hard sentence breaks. These degrade the quality of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
|
56690 |
27-Jan-2000 |
mharo |
cleanup using suggestions from bde
|
56597 |
25-Jan-2000 |
mharo |
Add human-readable output flag, -h
Reviewed by: obrien
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
41568 |
06-Dec-1998 |
archie |
Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).
|
40926 |
05-Nov-1998 |
rnordier |
Add missing '\n'; remove redundant 'h' case in getopt switch.
|
40925 |
05-Nov-1998 |
rnordier |
Add -c option to usage string.
PR: 8568 Submitted by: Ryan Younce <ryany@pobox.com>
|
39076 |
11-Sep-1998 |
des |
Print correct total for -c option (previously, the total for the last directory scanned was printed instead of the real total)
PR: bin/7896 Submitted by: Zach Heilig <zach@gaffaneys.com>
|
37952 |
29-Jul-1998 |
des |
Don't try to dereference a pointer to freed memory.
PR: bin/7393
|
36014 |
13-May-1998 |
phk |
.Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR: 6599 Reviewed by: phk Submitted by: Josh Gilliam <josh@quick.net>
|
32097 |
29-Dec-1997 |
jkh |
* add a -c option which displays the grand total of all files counted.
* re-word parts of the man page which I felt were badly worded or ambiguous.
* change the behaviour of argument processing so that when more than one of the -P, -H and -L options are specified it will print an error message, rather than choosing the last option specified, this behaviour is more logical and consistent with other utilities.
* change the behaviour of argument processing so that negative arguments to the -d option are not allowed.
PR: 5388 Submitted by: Niall Smart <rotel@indigo.ie>
|
28891 |
29-Aug-1997 |
wosch |
du(1) always exit with value zero.
$ du /foobar du: /foobar: No such file or directory $ echo $? 0
|
27099 |
30-Jun-1997 |
charnier |
Document -k flag.
|
24360 |
29-Mar-1997 |
imp |
compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic.
|
23693 |
11-Mar-1997 |
peter |
Merge from Lite2
|
23012 |
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
21673 |
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
19120 |
23-Oct-1996 |
scrappy |
Add a 'depth (-d#)' flag to du
patched (context diff), compiled (w/ -Wall) and tested
Submitted by: John-Mark Gurney <jmg@nike.efn.org>
|
17891 |
29-Aug-1996 |
wosch |
[HISTORY] command appeared in Version 1 AT&T UNIX Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
|
10041 |
13-Aug-1995 |
mpp |
Restore the reference to quot(8).
|
10034 |
12-Aug-1995 |
ats |
Submitted by: careilly@tcd.ie Colman Reilly replace the reference of quot(8) with a reference to quota(1). Colman Reilly noticed the missing quot, GNATS bin/671.
|
8874 |
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
2040 |
12-Aug-1994 |
dg |
The last commit was bogus...the putenv doesn't affect the parent process, so the BLOCKSIZE doesn't need to be preserved.
|
2039 |
12-Aug-1994 |
dg |
Implemented the -k flag more properly...don't destroy the user's setting of the BLOCKSIZE environment variable.
|
2009 |
10-Aug-1994 |
wollman |
Gimme my `-k' option back!
|
1591 |
27-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1590, which included commits to RCS files with non-trunk default branches.
|