determine whether a symlink has an ACL. Instead, assume that symbolic
links don't have ACLs and don't bother checking. Avoids spurious
ENOENT warnings when listing directories containing broken symlinks
on filesystems with ACLs enabled.
Pointed out by: rwatson, bde
listings if the file has an extended ACL (more than the required 3 entries).
This is what Solaris and IRIX do, and what the withdrawn POSIX.2c standard
required.
Reviewed by: rwatson (an earlier version of the patch)
than the LOMAC-specific interfaces for listing MAC labels. This permits
ls to view MAC labels in a manner similar to getfmac, when ls is used
with the -l argument. Next generation LOMAC will use the MAC Framework
so should "just" work with this and other policies. Not the prettiest
code in the world, but then, neither is ls(1).
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
appropriate. Before this, a 2.9 GB file was misleadingly reported as
"2G". This mostly brings unit_adjust() in line with what is in du(1).
Reviewed by: jmallett
Approved by: nik
-m List files across the page, separated by commas.
-p Print a slash after directory names
-x Same as -C but sort across the columns rather than down
Submitted by: Kyle Martin <mkm@ieee.org>
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
file sizes to be displayed with unit suffixes; Byte, Kilobyte,
Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the
number of digits to three or less.
Submitted by: nik
are now defined using the characters a-h and A-H for the bold
variants. The old way using 0-7 for the colours still works, but
prints a message asking the user to switch.
PR: bin/27374
the long -l output format with the last commit. Fix it
by replacing the "%b %e" strftime format with "%Ef".
Make a note in the manual page that the LANG environment
variable affects the running of ls.
Reviewed by: ache
representation of time and date") won't change in time. Instead
of hard coding the locations of the time elements and hoping that
they don't move use strftime to generate the desired formats in
the first place.
PR: bin/7826
Don't use curses functions, use tputs instead
Add ^C reaction - reset colors
Optimization - don't turn off colors after EACH file printed.
Fix wrong ctype macro arg type in LSCOLORS parsing
this is extremely inefficient, instead write them all down at the
beginning.
The correct sequence to switch colours off is to first use 'op' if
it exists, otherwise use 'oc'. If neither of these exist then we
shouldn't be doing colour with this terminal.
Reviewed by: ache
to manage the ANSI colour sequences. Colour support is disabled
unless the TERM environment variable references a valid termcap.
* Allow optional compilation of the colour support in the Makefile,
defaulting to yes. This allows us to switch it off for fixit
floppies and other mediums where space is an issue and the extra
bloat of statically linking with ncurses isn't acceptable.
* Display a warning if colour is requested with '-G' but support
for it isn't compiled in.
It is not switched on by default and must be enabled with the -G
flag. When using ls -G the output behaviour is modified with ANSI
colour sequences wrapped around filenames to help distinguish file
types. (Colours can be redefined in the LSCOLORS environment
variable as described in the manual page.)
Colour support is silently disabled (if switched on) if stdout
isn't a tty.
Based on: asami's colorls port.
PR: bin/18900 && ports/18616.
effectively overriding the dynamically-sized-column feature. This
is mostly useful for non-interactive use, where it may be necessary
to ensure that listings taken at different times have columns that
line-up correctly. I have been assured that at least one large,
well-known program will soon be taking advantage of this. :-)
PR: bin/7011
Submitted by: Joel Ray Holveck <joelh@gnu.org>
o Added a new '-b' which behaves as in AT&T Unices (show unprintables in
octal, using C escape codes when possible)
o Added '?' to the getopt() string, since the code in the switch considers
it as a valid option.