| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
display() to calculate column widths, but was not initialized in
main(). This resulted in a division by zero.
Noticed by: Michael Butler <imb@protected-networks.net>
|
|
|
|
|
|
|
| |
units (as returned by stat(2)) instead of BLOCKSIZE units.
Submitted by: Paul Schenkeveld
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.
Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):
"If the file is a character special or block special file, the
size of the file may be replaced with implementation-defined
information associated with the device in question."
This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.
Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).
|
|
|
|
|
| |
PR: docs/124468
X-MFC with: r218998
|
|
|
|
| |
Also remove some local patches to diff(1) which are now unneeded.
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the -i option will show the inode number of the referenced file
for symbolic links given on the command line. Similarly, the file color
was printed according to the link target in colorized output.
PR: bin/102394
Reviewed by: jilles
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
| |
- Allow -h option to work if the listing contains at least one device
file.
- Align major and minor device numbers correctly to the size field.
PR: bin/125678
Approved by: trasz (mentor)
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
| |
provides an empty fts_name and reporting the full path is more
appropriate especially with the -R option.
PR: bin/107515
Submitted by: bde
Approved by: trasz (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
According to the man page, when neither -H/-L nor -F/-d/-l are given, -H is
implied. This agrees with POSIX, GNU ls and Solaris ls. This means that -p,
although it is very similar to -F, does not prevent the implicit following
of symlinks.
PR: standards/128546
|
|
|
|
|
|
| |
to be rewritten for each file we want to check ACL on. Without
this change, ls(1) would check only the ACL on the first file
to list.
|
| |
|
| |
|
|
|
|
| |
Tabs Noticed by: Antoine Brodin
|
|
|
|
|
| |
- Bump document date for the addition of the -D option.
- Reformat a sentence to look like a real sentence.
|
| |
|
|
|
|
|
|
|
|
| |
# ls -lW
total 2
-rw-r--r-- 1 root wheel 6 Oct 18 14:46 file1
ls: ./file2: No such file or directory
w--------- 0 root wheel 0 Jan 1 1970 file2
|
|
|
|
|
|
|
|
| |
- Document how whiteouts look in the long output. [1]
- Sort entry types.
- Fix description of the socket type.
PR: docs/51921 [1]
|
| |
|
|
|
|
| |
specified wins to make their interaction less confusing.
|
|
|
|
|
|
|
|
|
| |
flag to use a time other than modtime (-c, -u, or -U), the output would
actually be sorted by the specified time rather than size. This does
alter the behavior in the case where both -S and -t are specified. Now,
-S is always preferred. Previously, -t was preferred if one of -c, -u, or
-U was specified, and -S was preferred otherwise. Perhaps -S and -t should
override each other (last one specified wins).
|
| |
|
|
|
|
|
|
|
| |
sorting.
Submitted by: Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
files is too much and hard to follow. Instead, make the -I option
just mean "do not automatically set -A for root". That is, if -A
is explicitly set, -I is ignored. Also, document -I in usage().
(The ls.c diff is better viewed relative to rev. 1.80.)
No objection: mux
Silence from: mnag
MFC after: 3 days
|
|
|
|
|
| |
Spotted by: ru
MFC after: 3 days
|
|
|
|
|
|
| |
PR: bin/86710
Submitted by: Marcus Alves Grando
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
PR: docs/84765
Submitted by: garys
Approved by: keramida
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
sort(1). This functionality is provided by the -S option now, and it
is useful even though a similar effect is achievable with sort(1),
since the latter doesn't work in combination with -h. This option is
also present in NetBSD, OpenBSD, and GNU fileutils, so there's clearly
a demand for it.
Noticed by: asmodai
|
|
|
|
| |
particular order.
|
|
|
|
|
|
|
|
| |
have this option with identical semantics (sorting large files first).
-r can be used to reverse the sort if that is desired.
PR: 81625
Submitted by: Kostas Blekos <mplekos@physics.upatras.gr>, keramida
|
| |
|
| |
|
|
|
|
| |
Sort standard sections in the (documented) preferred order.
|
|
|
|
|
|
|
|
|
|
|
| |
regardless whether the output is to a terminal or not. As this is
consistent with the SUSPv2 specification (even though we do not
otherwise fully implement SUSPv2's ls(1) options), document this as it
is now, rather than trying to change the behaviour itself.
PR: docs/76072
Submitted by: Sebastian Rey <Sebastian.rey@gmx.net>
MFC after: 1 week
|
| |
|
| |
|
|
|
|
|
|
| |
line after the empty variable declarations.
Reviewed by: md5
|
|
|
|
|
|
|
|
| |
the [acm]time are the same. I was going to use Scott's patch, but I
couldn't get the style quite right, so I used a patch of my own.
Submitted by: Scott Mitchell <scott+freebsd at fishballoon.org>
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have no entries to print (either due to an empty directory or an
error). This makes the -l and -s options more consistent, like
Solaris and (Debian) Linux. To make this happen, tweak two
optimizations on the second call to display():
- Don't skip display() altogether, even if list == NULL.
- Don't skip the call to the printfn in display() if we
need to print the total.
PR: 45723
|
|
|
|
|
| |
if there are no entries, these functions may be called to print the
total number of blocks (0) for consistency's sake.
|
|
|
|
|
|
| |
PR: bin/67392
Submitted by: Matthew Emmerton <matt@gsicomp.on.ca>
MFC in: 1 week
|
|
|
|
| |
Reminded by: jhb
|
| |
|
|
|
|
| |
unprintable characters have a "width" of -1.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LC_CTYPE setting) when determining which characters are printable.
This is an often-requested feature.
Use wcwidth() to determine the number of column positions a character
takes up, although there are still a few places left where we assume
1 byte = 1 column position, e.g. line-wrapping when handling the -m option.
The error handling here is somewhat more complicated than usual: we do
our best to show what we can of a filename in the presence of conversion
errors, instead of simply aborting.
|
|
|
|
| |
OK'ed by: imp, core
|
|
|
|
|
|
|
|
|
|
| |
will print them (i.e., number of successful calls to acl_get_entry()
exceeds 3). This makes O(1) what was O(num_TYPE_ACCESS_ACLs).
This is a slightly modified version of submitter's patch.
PR: bin/65042
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Sizes in the range 1000 -- 1023 units require four characters width
for the integer; increase the field width to accomodate this.
2. Sizes in the range 9.95 -- 10 units were being displayed as "10.0"
units; adjust the logic to fix this, and now that we've got an extra
character of field width, print fractional units if the size is less
than 99.95 units.
3. Don't display sub-byte precision.
This should mean that the following sizes are displayed:
0B .. 1023B
1.0U .. 9.9U
10.0U .. 99.9U
100U .. 1023U
for values of U in "KMGTPE".
PR: bin/63547
Pointy hat to: cperciva
Approved by: rwatson (mentor)
|