Operating System - HP-UX
1752793 Members
5890 Online
108789 Solutions
New Discussion юеВ

Re: Maddening: ls -l output messed up

 
SOLVED
Go to solution
Andrew Scott_3
Regular Advisor

Maddening: ls -l output messed up

I have an issue on one of my HP-UX machines. when you do an ls -l (ll) on it, in any terminal, the blank space on either side of the group is ENORMOUS, and scales with the terminal width. This is extremely annoying. See attached screenshot.

I've been unable to find a difference between the environment variables and stty settings from the machine that is doing this and any of my other HP-UX machines.

How do I fix this?
19 REPLIES 19
Pete Randall
Outstanding Contributor

Re: Maddening: ls -l output messed up

What do the executables look like?

$ ls -l /usr/bin/ll
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/ll*
$ ls -l /usr/bin/ls
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/ls*


Pete

Pete
Andrew Scott_3
Regular Advisor

Re: Maddening: ls -l output messed up

In terms of permissions and sizes, exactly the same as my systems that do not exhibit this issue:

$ ls -l ls
-r-xr-xr-x 7 bin bin 77852 Feb 15 2007 ls
$ ls -l ll
-r-xr-xr-x 7 bin bin 77852 Feb 15 2007 ll
Mel Burslan
Honored Contributor

Re: Maddening: ls -l output messed up

Can you see any difference(s) on the output of 'stty' command between a properly displaying system and this one ?
________________________________
UNIX because I majored in cryptology...
Andrew Scott_3
Regular Advisor

Re: Maddening: ls -l output messed up

Zero difference in stty settings at all. I literally ran stty -a on two machine in two terminals with window transparency and laid them on top of each other. They're both exactly the same.

I've also messed with tabs, to no avail. It changes how far the cursor moves when I hit the tab key, but it doesn't affect the whitespace around the group column in ls output.

This is all under HP-UX 11.31, patched up to March '09, and using TERM set to xterm. The behavior exhibits in any terminal as well as the serial console. Root a normal users. I've even gone so far as to copy the /etc/profile from a properly working machine onto this one, with no change in behavior.
Hein van den Heuvel
Honored Contributor

Re: Maddening: ls -l output messed up

Well,

man ls indicates /usr/share/lib/terminfo/?/* as a dependency.

It may take formatting information from there.
What is TERM set to?
Try setting it to VT100 or HPTERM?

If you use
# ls -l > test.txt
and then
# cat test.txt
does that look alright?

does # od -c on that test.txt show any hard tabs? ( \t = 011 )

Does your terminal emulator have a 'scope' or 'do-not-interpret-controls' mode? Try it!

Try settings tab stops with 'tabs' every 8 columns?

just some things I would try.
fwiw,
Hein
Andrew Scott_3
Regular Advisor

Re: Maddening: ls -l output messed up

TERM is most often set to xterm, but the behavior exists if I change it to vt100 and hpterm.

piping the output to a text file and catting the text file shows the same massive gaps around the group field. loaded in vi with list set to show hidden characters shows none, the whitespace is literally just a bunch of spaces.
Andrew Scott_3
Regular Advisor

Re: Maddening: ls -l output messed up

the od -c output looks like this:

*
0250560 7 2 1 2 8 F e b 1 5
0250600 2 0 0 7 u n t i c \n - r -
0250620 x r - x r - x 2 b i n
0250640
*

I really don't know how to read that.
Andrew Scott_3
Regular Advisor

Re: Maddening: ls -l output messed up

Okay, read the od man page. Similar to setting list in vi.

No hard tabs anywhere in the output. The whitespace is just that, spaces.
Hein van den Heuvel
Honored Contributor

Re: Maddening: ls -l output messed up

>> does # od -c on that test.txt show any hard tabs? ( \t = 011 )

That was a silly remark for a piped file.
But if you could log a telnet session...

how do other commands which show user/group behave?

For example:
# UNIX95= ps -o group,user,pid
# groups

Hein.