- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ls alignment
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:42 AM
тАО03-04-2009 05:42 AM
ls alignment
I have a problem with ls command; when I run it I get an output like the next one:
-rwxr-x--- 1 root CR-USER 48 Feb 26 11:14 ControllaQIO
-rwxr-x--- 1 root root 2630207229 Feb 26 10:36 FileProve.txt
-rwxr-x--- 1 root CR-USER 229 Feb 26 11:47 LancioTest512Mb
-rwxr-x--- 1 root CR-USER 509 Feb 26 12:06 LancioTestParalleloAPC2
I didn't find anything on the man page....is there a way to have a correct output?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:49 AM
тАО03-04-2009 05:49 AM
Re: ls alignment
The output is correct. What matters is that there are discrete _fields_ separated by whitespace. Hence, you can parse based on the field-number with "cut' or "awk' or Perl.
If you want to reformat the output, pipe the output to a tiny 'awk' script that uses a 'printf' statement.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:50 AM
тАО03-04-2009 05:50 AM
Re: ls alignment
check with 'alias' if there's an alias command for 'ls'.
That would explain such a result.
Then you have to change that setting.
Maybe you get also a correct output with '/usr/bin/ls'?
What does 'which ls' says?
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:59 AM
тАО03-04-2009 05:59 AM
Re: ls alignment
> output?
Define "correct".
Write your own "ls"?
Use GNU "ls", which has more (possibly
useful) formatting options?
http://www.gnu.org/software/coreutils/
http://www.gnu.org/software/coreutils/manual/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 06:25 AM
тАО03-04-2009 06:25 AM
Re: ls alignment
You could write a script that takes the fields from ls and uses awk to align them.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 06:25 AM
тАО03-04-2009 06:25 AM
Re: ls alignment
Actualy the only alias defined is:
ls=/usr/bin/ls (the default one)
I noticed that it do this only when the file size is bigger then 10Mb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 06:34 AM
тАО03-04-2009 06:34 AM
Re: ls alignment
Yes, that's right, but why do you complain about that? Because you're more familiar with Tru64?
Well, ok - this is HP-UX ... I never had problems with this.
This *is correct* for HP-UX.
BTW you only see this with the 'll' or 'ls -l' command :-)
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 07:24 AM
тАО03-04-2009 07:24 AM
Re: ls alignment
Anyway, I think that awk solution should be ok, for now.
Thanks to everyone ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 07:25 AM
тАО03-04-2009 07:25 AM