Commit Graph

21 Commits

Author SHA1 Message Date
Greg Lehey
dfd91f79a3 Replace spaces with tabs where appropriate.
Reminded by: jh@
2012-11-08 23:45:19 +00:00
Greg Lehey
9aa68a3ffa Add y flag and environment variable LS_SAMESORT to specify the same
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
2012-11-08 00:24:26 +00:00
Ed Schouten
99742a231f Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
2010-03-28 13:16:08 +00:00
John Baldwin
fe79420eb7 Add a new -U flag to instruct ls to use the birthtime for printing or
sorting.

Submitted by:	Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after:	1 week
2006-03-24 16:38:02 +00:00
Dima Dorfman
71b8b74887 Add the -S option to sort files by size. NetBSD and OpenBSD already
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
2005-06-03 11:05:58 +00:00
Warner Losh
9ddb49cbe4 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
David Malone
f137c9c100 Fix some style bugs I introduced pointed out by bde. Also add a blank
line after the empty variable declarations.

Reviewed by:	md5
2004-06-23 08:26:31 +00:00
David Malone
60e52383e7 Use nanoseconds and then lexicographic ordering when the seconds of
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
2004-06-22 16:02:29 +00:00
Mark Murray
6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
David E. O'Brien
5eb43ac2f7 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
Mark Murray
c73d77cef9 Use __FBSDID() and clean up the vendor tags. 2002-02-03 20:55:54 +00:00
Warner Losh
46251dde8f o __P has been reoved
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.
2002-02-02 06:48:10 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Steve Price
febad2fcf4 Observe precedence set by Phillippe Charnier in adding an
rcsid.
1997-08-07 22:28:25 +00:00
Steve Price
d46c1a60d3 Remove #if(n)def BSD_4_4_LITE cruft and sccsid -> rcsid. 1997-08-07 15:33:50 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Andrey A. Chernov
942c84aabd Use strcoll instead of strcmp for file names comparation
Should be in 2.2
1996-12-28 03:46:27 +00:00
Steve Price
fb5cb2083a Merge Lite2 mods, and -Wall cleaning. undelete(2) cruft
not yet implemented is protected by a define (BSD4_4_LITE)
that should be removed when this call is supported by the
kernel.
1996-12-14 06:03:29 +00:00
David Greenman
89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Rodney W. Grimes
4b88c807ea BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00