| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
| |
this case skip the test as gcc complains it is always true.
|
|
|
|
| |
format strings, "period, space, space" in comment text, etc.
|
|
|
|
| |
Reminded by: jh@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sorting order for time and name with the -t option. IEEE Std 1003.2
(POSIX.2) mandates that the -t option sort in descending order, and
that if two files have the same timestamp, they should be sorted in
ascending order of their names. The -r flag reverses both of these
sort orders, so they're never the same. This creates significant
problems for sequentially named files stored on FAT file systems,
where it can be impossible to list them in the order in which they
were created.
Add , (comma) option to print file sizes grouped and separated by
thousands using the non-monetary separator returned by localeconv(3),
typically a comma or period.
MFC after: 14 days
|
| |
|
|
|
|
| |
Original code by: Gleb Kurtsou
|
|
|
|
|
|
|
| |
(and thus needs to depend on libtermcap). Embedded systems may not
want or need colors.
Obtained from: Juniper Networks, Inc.
|
|
|
|
|
|
|
| |
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.
|