|
IBM's reply:
Robert,
In the qshell environment the -S option on ls does not mean sort by size
as it does in some unix environments. In qshell that option means that
the CCSID of the file should be displayed. This is documented in the
information center and it does appear to work as documented.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahz/ls.htm
I tried it in the portable utilities (PASE) environment, I found that it
states that it doesn't support the S option at all.
As always seems to be the case with unix environments, there is a fairly
simple way to get what you want though. You can pipe the output of the
list (ls) command into the sort utility and sort it by the 4th column (you
have to use the long format of ls to get the size displayed) and I wanted
the list in decreasing order so I added the -r to the sort to reverse the
order:
ls -al | sort +4 -r
My testing:
This seems to work
ls -al | sort +4 -r-rw-rw-rw- 1 QNOTES 0 18751160320 May 15 13:36 a_lsoto.nsf
-rw-rw-rw- 1 QNOTES 0 17524064256 May 15 13:35 a_tmena.nsf
-rw-rw-rw- 1 QNOTES 0 17052991488 May 15 13:34 a_dhayes.nsf
-rw-rw-rw- 1 QNOTES 0 11409293312 May 15 13:37
a_agallego.nsf
-rw-rw-rw- 1 QNOTES 0 10806362112 May 15 13:35
a_rbixler.nsf
-rw-rw-rw- 1 QNOTES 0 10574364672 May 15 13:34
a_vgarcia.nsf
-rw-rw-rw- 1 QNOTES 0 9651355648 May 15 13:36 a_rriner.nsf
...
Result:
Submit DCR. A workaround is one step away from a reacharound.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From:
John McKee <jmmckee@xxxxxxxxxxxxxx>
To:
midrange-l@xxxxxxxxxxxx
Date:
05/15/2009 10:10 AM
Subject:
Re: qshell, ls, sort by size
Sent by:
midrange-l-bounces@xxxxxxxxxxxx
Odd. I have cygwin on my desktop, and ls -lS works in that environment,
but
doesn't in QSH
John McKee
Quoting rob@xxxxxxxxx:
How do I use ls in qshell to sort by size? Searched a few man pages butlist
no quick sample.
Trying
ls -lS l_*.nsf
and a few other combinations.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.