bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: QSH LS Info


From: Bocchino, Frank
Subject: FW: QSH LS Info
Date: Wed, 6 May 2009 15:44:16 -0400


I'll try one more on this...any help appreciated. 


Hi Bob and thanks for responding.  I'm on an AS400, which I assume has
something to do w/my issue.  

When I run ls --version here's what I get;

   ls: 001-3015 usage: ls [-ACFLRSTacdfiloqrstu1] [file ...]

   Press ENTER to end terminal session.   

When I run ls --help | grep -e -S here's what I get;
   ls: 001-3015 usage: ls [-ACFLRSTacdfiloqrstu1] [file ...]

   grep: 001-3010 usage: grep [-E | -F] [-c | -l | -q] [-ihnsvwxy] [-e
pattern_list] [-f pattern_file] [pattern] [file ...]

   Press ENTER to end terminal session.    


So, I'm not sure why they don't work but if I have to use 

ls -al | sort -k5,5nr

What will that cmd do?  What's the -k5,5nr mean?   

What would you recommend as the best way to learn what all the
switches/options on each cmd and what they mean? 

Again, much thanks, 
Frank                                   



 

-----Original Message-----
From: Bob Proulx [mailto:address@hidden 
Sent: Monday, May 04, 2009 10:15 PM
To: Bocchino, Frank
Cc: address@hidden
Subject: Re: QSH LS Info

Bocchino, Frank wrote:
> I'm trying to create a report that'll show a directory sorted by
> file size.  I thought -S would provide that but it's not working.

What version of ls are you using?

  ls --version

What does the --help output show?

  ls --help | grep -e -S

I ask because I wonder if you are actually running 
that supports it.

> The syntax I'm using is;
> STRQSH CMD('ls -alS > /fbtest/test.txt')

Looks okay to me.

> Is there any way to run a QSH cmd that'll sort by file size? 

It works for me.

Worst comes to worst you can always use sort for this.

  ls -al | sort -k5,5nr

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]