aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/du
Commit message (Collapse)AuthorAgeFilesLines
* MFC r346571,r346572:Enji Cooper2019-04-291-2/+1
| | | | | | | | | | | | Update the spelling of my name Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji instead for clarity. While here, remove "All Rights Reserved" from copyrights I "own". Notes: svn path=/stable/11/; revision=346920
* Revert r330897:Eitan Adler2018-03-291-3/+1
| | | | | | | | | | | | | | | | | | | | This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code. Revert with prejudice. This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes. Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes. Requested by: gjb (re) Notes: svn path=/stable/11/; revision=331722
* Partial merge of the SPDX changesEitan Adler2018-03-141-1/+3
| | | | | | | | | | These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Notes: svn path=/stable/11/; revision=330897
* MFC r322291: du(1): Add --si option to display in terms of powers of 1000Kyle Evans2018-01-183-21/+60
| | | | Notes: svn path=/stable/11/; revision=328139
* MFC r319850:Enji Cooper2017-07-183-0/+162
| | | | | | | | | | | | | | | | | | 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. Notes: svn path=/stable/11/; revision=321132
* MFC r319846:Enji Cooper2017-07-171-2/+1
| | | | | | | du(1): trivial whitespace cleanup Notes: svn path=/stable/11/; revision=321096
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-7/+3
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync with HEAD.David E. O'Brien2013-02-081-1/+19
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ Sync from headSimon J. Gerraty2012-11-042-8/+14
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | du(1): replace malloc + memset with calloc.Pedro F. Giffuni2015-02-171-5/+2
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=278921
* | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | New sentence, new line.Joel Dahl2012-11-041-4/+4
| | | | | | | | | | | | | | | | | | | | | Submitted by: brueffer Notes: svn path=/head/; revision=242551
* | | Add a few basic examples.Joel Dahl2012-11-041-1/+19
| |/ |/| | | | | Notes: svn path=/head/; revision=242550
* | Document -g option in the usage string.Sergey Kandaurov2012-07-261-1/+1
| | | | | | | | Notes: svn path=/head/; revision=238817
* | Add -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).Dag-Erling Smørgrav2012-07-182-7/+13
|/ | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=238602
* du: Allow multiple -HLP options, the last one wins.Jilles Tjoelker2011-12-172-20/+17
| | | | | | | | | | 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 Notes: svn path=/head/; revision=228669
* Update du(1):Glen Barber2011-12-092-45/+53
| | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=228356
* Simplify getopt switch parsing.Ed Schouten2011-11-081-12/+4
| | | | | | | | | | | 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) Notes: svn path=/head/; revision=227335
* Add missing static keywords to du(1)Ed Schouten2011-11-061-1/+1
| | | | Notes: svn path=/head/; revision=227164
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-112-8/+0
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=216370
* Fix typos and spelling mistakes.Joel Dahl2010-08-061-1/+1
| | | | Notes: svn path=/head/; revision=210933
* Add a -t switch for masking output that's above or below certain thresholds.Brian Somers2010-06-202-3/+28
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=209362
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Report the next directory being scanned when a ^T is pressed (or anyWarner Losh2009-04-301-0/+15
| | | | | | | | | | 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... Notes: svn path=/head/; revision=191677
* Restore (intmax_t) casts I lost during the last change & unbreak the build.Max Laier2008-11-061-4/+6
| | | | Notes: svn path=/head/; revision=184742
* Add two new options to du(1):Max Laier2008-11-062-35/+85
| | | | | | | | | | | | | | | | | | | | | | | | | -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@ Notes: svn path=/head/; revision=184733
* Declare functions and variables static and save a few byte. This is aMax Laier2008-11-041-9/+9
| | | | | | | style(9)-change, too. Separate commit as it changes the object. Notes: svn path=/head/; revision=184656
* style(9): mostly avoiding line wrap by not indenting cases. No obj change.Max Laier2008-11-041-111/+118
| | | | Notes: svn path=/head/; revision=184654
* Implement from scratch a -l option for du(1), to match the same optionGiorgos Keramidas2008-02-252-11/+23
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=176561
* setenv(3) sets errno on failure, use warn() insteadKevin Lo2007-11-081-3/+3
| | | | | | | Pointed out by: ru Notes: svn path=/head/; revision=173431
* Check return value for setenv()Kevin Lo2007-11-061-3/+7
| | | | Notes: svn path=/head/; revision=173387
* Significantly reduce the memory leak as noted in BUGS section forSean Farley2007-07-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=171195
* Back out all POSIXified *env() changes.Andrey A. Chernov2007-05-011-3/+3
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=169177
* Eliminate error with -W* strict flags and make putenv() calls conforming toAndrey A. Chernov2007-04-301-3/+3
| | | | | | | standard and portable in the same way as f.e. gcc internal portable code does. Notes: svn path=/head/; revision=169113
* Markup fixes.Ruslan Ermilov2006-09-291-1/+5
| | | | Notes: svn path=/head/; revision=162792
* o Implement "-n" flag: ignore files and directories with user "nodump"Maxim Konovalov2006-05-062-3/+14
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=158339
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-05-211-1/+1
| | | | Notes: svn path=/head/; revision=146466
* Remove unused variables.Stefan Farfeleder2005-04-091-2/+1
| | | | Notes: svn path=/head/; revision=144840
* Use 64bit 'fts_bignum' field instead of 32bit (on 32bit archs) fieldPawel Jakub Dawidek2005-01-071-11/+13
| | | | | | | | | | | | | | | '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 Notes: svn path=/head/; revision=139813
* Add a missing full-stop to match the rest of the items in a list.Giorgos Keramidas2004-10-241-1/+1
| | | | Notes: svn path=/head/; revision=136848
* Use the length modifier 'll' instead of 'q' to print long longs.Stefan Farfeleder2004-07-281-1/+1
| | | | Notes: svn path=/head/; revision=132799
* Respect locale settings from the environment.Tim J. Robbins2004-07-151-0/+3
| | | | Notes: svn path=/head/; revision=132201
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-2/+4
| | | | Notes: svn path=/head/; revision=131491