Commit Graph

188 Commits

Author SHA1 Message Date
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
rin 1eca2a869b white space 2017-02-06 21:06:04 +00:00
sevan 51fe790c4c Drop main() prototype. 2016-09-05 01:00:07 +00:00
sevan 614e743689 ls was there from v1.
Confirmed from the TUHS & cat-v.org hosted copies of man pages
2016-08-10 17:45:12 +00:00
dholland 067a182606 PR 50997 David Binderman: fix format strings 2016-05-30 17:26:29 +00:00
jschauma 8e9bed0cec Remove the confusing reference to 'file sizes' in the short description of
the '-l' flag.  As explained in the Long Format section, the total is of
the blocks used by the files, and only applies to directories.
2014-10-18 01:49:01 +00:00
martin 062900c4c2 PR bin/48798: fix format for ino_t.
Slightly modifed variant of the patch provided by Thomas Schmitt.
2014-05-10 09:39:18 +00:00
wiz b0b52b7f33 Wording improvement for previous.
From jmc@OpenBSD via Igor Sobrado.
2014-04-02 19:54:30 +00:00
wiz ac632886e5 Apply diff from Igor Sobrado <isd@orion.ciencias.uniovi.es>:
We have written a diff to our ls(1) to recover the traditional behaviour
of -f implying -a.  This change does not only accommodates POSIX.1
but also matches traditional UNIX.

OpenBSD commit message:

CVSROOT:        /cvs
Module name:    src
Changes by:     sobrado@cvs.openbsd.org 2014/03/31 14:54:37

Modified files:
        bin/ls         : ls.1 ls.c

Log message:
restore the traditional behavior of -f implying -a; apparently Keith Bostic
forgot to restore it when the -f flag was put back on 2nd of September 1989,
after being removed on 16th of August as a consequence of issues getting it
working over NFS, so deviation from traditional UNIX behavior in all BSDs
looks like an historical accident; as a side effect, this change accommodates
behavior of this option to IEEE Std 1003.1-2008 (``POSIX.1'').

joint work with jmc@ (who found the inaccuracy in our implementation),
schwarze@ (who provided a detailed tracking of historical facts) and millert@

ok millert@, schwarze@
2014-04-02 10:55:47 +00:00
mlelstv fa4d72b17c fix -w output 2014-02-22 13:11:42 +00:00
mlelstv d85eb2bfe0 add u option to getopt again. 2014-02-22 13:08:13 +00:00
christos c7dda21c10 Add -X (don't cross mount points when recursing) from tls@ 2014-02-21 02:42:41 +00:00
wiz 9a4a31623a Use .Nm for 'ls'. 2014-02-20 19:10:25 +00:00
christos 0c47a5c376 Add -O (only leaf files) and -P (print full path), from tls@ 2014-02-20 18:56:36 +00:00
zafer 51b7448f79 remove whitespace from end of file.
introduced by erh in 1.49
2013-05-02 22:43:55 +00:00
abs 6f08f9dbdd PR/47167
ls.1:
- Sort options in `SYNOPSIS', the option list, and texts within
  the man page;
- improve wording;
- improve macro usage;
- use more consistency regarding (locations for) information about
  which options override which;
- cross-reference `-d' and `-R';
- simplify description of `-k', removing redundant and unneeded
  information;
- sort entry type list (but leave `-a' and `-A' as they are, given
  their meaning);
- correct / augment description of `BLOCKSIZE' environment variable
  in `ENVIRONMENT' section;
- bump date.

ls.c:
- Sort options in `usage';
- augment comment about when to figure out block size.
2012-11-20 12:37:29 +00:00
wiz 9ed3eb6e68 Use more markup. 2012-10-21 08:18:27 +00:00
jschauma 708ea1dcd8 clarify that BLOCKSIZE also influences the total in long output 2012-10-21 01:39:05 +00:00
yamt 46583bd0ea handle realloc failure 2012-06-29 12:51:38 +00:00
joerg 44db7ee6ac Move usage and mark it static+dead 2011-08-29 14:44:21 +00:00
mbalmer 95f605c283 Wording fixes from Ryo HAYASAKA, thanks. 2011-04-02 08:38:56 +00:00
christos cde105a416 - use printf(3) "'" format to do thousands grouping instead of custom version.
- fix sign format inconsistencies.
2011-03-15 22:53:41 +00:00
wiz 77dc3c9d0c Add -M to usage. 2011-03-15 08:36:16 +00:00
wiz 0f3a9d3c9c Remove trailing whitespace. Add -M to usage. 2011-03-15 08:36:01 +00:00
erh 4aaf499c53 PR#7540, add a -M option to ls which causes sizes (and number of blocks) to be
displayed with comma separators (or a locale specific separator).
2011-03-15 03:52:37 +00:00
njoly 9f266c104e Fix cross-reference, dir(5) -> dirent(3). 2010-12-17 19:20:42 +00:00
enami 5a8bd46049 Fix broken indentation. No functional change. 2010-08-18 02:53:54 +00:00
rmind 1126bbae2c Add #include <sys/param.h> for howmany(). 2010-07-08 20:43:34 +00:00
joerg 3a7ba0e773 Reorder sections to canonical order. Use .Ex -std 2010-05-14 17:11:52 +00:00
joerg f95fad15ff \\ -> \e 2010-04-05 21:16:21 +00:00
christos b22f104713 make it obvious to grep that we are checking ctime. 2010-04-02 15:09:12 +00:00
christos 221f2e33dd handle ctime returning NULL 2010-04-01 22:23:27 +00:00
lukem 990d25a96c fix -Wsign-compare issues 2009-02-14 08:02:04 +00:00
christos 909ffa3267 prepare for 64 bit dev_t 2008-12-28 19:30:33 +00:00
ahoka c111d82975 Implement a printtotal function to avoid code repetition. 2008-11-02 02:27:32 +00:00
lukem 41f5d0fda6 Change '-n' so that it implies '-l' rather than requires '-l'.
Brings ls(1) closer to POSIX.1 2004.
Per discussion with Thomas Klausner and Igor Sobrado.
2008-09-25 23:44:05 +00:00
lukem 2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
soda 7dd0dd9e6b modify a comment in previous change 2007-06-06 13:21:28 +00:00
wiz 8c64f063a1 Apply SODA Nuriyuki's patch for multibyte support.
Based on soda-revised2.patch (in private mail) with a change from
soda on tech-userlevel.

Ok christos@.
2007-06-05 17:48:19 +00:00
he 0a97c3f688 Complete the move of string_to_flags() and flags_to_string() from the
bin/ls sources to libutil:
 o Bump libutil minor version number
 o Fix uses to include <util.h> to pick up the function definitions
 o Fix most uses of flags_to_string() to release the now-malloc()ed result
2006-12-14 20:09:35 +00:00
he 29ff6ed16a The "#ifdef UNUSED_BLOCK" in stat_flags.c wasn't so unused after
all -- it was used by the mtree source.  So, instead do an "#ifdef
MTREE", and define that one when building mtree.
2006-12-14 17:54:19 +00:00
christos 78509e7f31 Pass lint. From Anon Ymous 2006-12-14 14:15:26 +00:00
elad 8fea60435c PR/34499: mac at S dot culver dot net: ls allocates more memory than needed
Applied patch, thanks!
2006-09-23 19:54:53 +00:00
elad cfbe6aa48d PR/33635: Anne Bennett: Document 'a' and 'A' flags in ls(1).
strmode(3) already documented these, so use the description from there.
2006-09-22 23:00:32 +00:00
christos eae5877e02 from zafer: you can have either -k or -h but not both since it does not make
sense.
2006-08-21 19:08:47 +00:00
wiz 3598f93379 Fix date (no leading zero), fix xref: sticky(7) not (8). 2006-04-08 22:39:39 +00:00
jschauma b338995776 Address PR 30374 as suggested in there:
"Modify the man page to match the behaviour of "ls -q",

(done by yamt@ previously)

...
modify both the behaviour and documentation for "ls -b" and "ls -B" to
make spaces readily apparent.  This could be done by adding VIS_WHITE
to the flags passed to strvis(3) in the safe_print() function in
src/bin/ls/util.c."

'ls -b' now yields foo\sbar (whitespace) foo\tbar (tab) foo\rbar (CR).
'ls -B' now yields foo\040bar foo\011bar foo\015bar.
2006-04-08 22:28:06 +00:00
yamt 3dc055fb76 s/non-graphic/non-printable/ to match with the code. 2006-04-08 12:04:22 +00:00
christos 7e2f55514f Coverity CID 1755: Add fts_close() in traverse. 2006-03-22 16:20:34 +00:00