1833776 Members
2260 Online
110063 Solutions
New Discussion

Re: ll not working

 
SOLVED
Go to solution
Amiel Tutolo
Frequent Advisor

ll not working

When I am logged in as any user and I am at the / (root level) the ll command including ls -l and other variations returns nothing. If I do an ls -a it works. Any help would be greatly appreciated.
Live, love and laugh
23 REPLIES 23
Jean-Luc Oudart
Honored Contributor

Re: ll not working

Hi

please post
which ll
type ll

if you enter /usr/bin/ll what is the output like ?

Regards,
Jean-Luc
fiat lux
Steven E. Protter
Exalted Contributor

Re: ll not working

whence ll

Is it there?

ls -la the put put.

This is a command, not an alias, so if its there it should work.

Next, Check PATH variable, make sure /usr/bin is part of it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor

Re: ll not working

Hi Amiel,

When you see this problem - run

which ls
and
which ll

It *should* come back
/bin/ls
/bin/ll

If it's different, then there's other ls and ll binaries out there & you need to get /bin into your path *before* their location.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Amiel Tutolo
Frequent Advisor

Re: ll not working

which ll returns /usr/bin/ll
type ll retruns ll is /usr/bin/ll

ls -l the put put returns
the not found
put not found
put not found

/usr/bin is in $PATH
Live, love and laugh
Amiel Tutolo
Frequent Advisor

Re: ll not working

which ll and which ls return
/usr/bin/ls
/usr/bin/ll
Live, love and laugh
Amiel Tutolo
Frequent Advisor

Re: ll not working

Just for calrification the command hangs until I kill it when running at the / level.
Live, love and laugh
Pete Randall
Outstanding Contributor

Re: ll not working

I think SEP was referring to a form of miniature golf..

;^)


Pete

Pete
Sridhar Bhaskarla
Honored Contributor
Solution

Re: ll not working

Hi,

I believe you have an NFS filesystems that is hanging. ls will work but not ll as it has to generate a long listing.

YOu will need to get your NFS fixed first. Your bdf may be hanging too. To find out the NFS mounted file systems do cat /etc/mnttab. Check the NFS servers from where you are mounting and fix them if they are not responding.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeroen Peereboom
Honored Contributor

Re: ll not working

Some guesses:

* Try an /usr/bin/ls -l | cat -v.
Maybe there are control characters in ls's output,

* Do you use NIS or something like that? Maybe usernames / groupnames cannot be found?

* No problem on other directory?

JP.
Jeroen Peereboom
Honored Contributor

Re: ll not working

Forgot to mention:
Does bdf command work?

JP
Patrick Wallek
Honored Contributor

Re: ll not working

You need to verify that your 'ls' executable is OK. ll, l, lsf, lsr and others are hard links to ls. If you do the following:

# cd /usr/bin
# ls -l l lc ll ls lsf lsr lsx

-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/l*
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/lc*
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/ll*
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/ls*
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/lsf*
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/lsr*
-r-xr-xr-x 7 bin bin 28672 May 5 2003 /usr/bin/lsx*

You should get something like the above. Notice the '7' in the link count and the fact that they are all the same size. This should be the case on your machine as well.

This list was taken on an 11.11 machine, so yours may be slightly different depending on your OS release and any patches you may have installed.

If any of the files in the list are different, then I would look at your backups and see what changed.

Also -- are you sure you have permissions to see all of the info when logged in as a user? Are there any NFS mounts involved?

Amiel Tutolo
Frequent Advisor

Re: ll not working

I am not currently using NFS on this system. The cat on /etc/mnttab does show a /net listing that I do not see on my other systems. The /usr/bin/ls -l | cat -v hangs until I kill it.
Live, love and laugh
Jean-Luc Oudart
Honored Contributor

Re: ll not working

Any NFS mounted file systems ?

libautofs.a
SR: 8606221217
DTS: JAGad90351
The "ll" command hangs in the case of an automounted
file system if the server is down.


Regards,
JL
fiat lux
Sridhar Bhaskarla
Honored Contributor

Re: ll not working

Them you probably have a corrupted filesystem or a mount point that is not available or hanging. Do you see any error messages in 'dmesg' or /var/adm/syslog/syslog.log file?

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jean-Luc Oudart
Honored Contributor

Re: ll not working

Could you post ?
/etc/rc.config.d/nfsconf
/etc/auto_master

Regards,
Jean-Luc
fiat lux
Sridhar Bhaskarla
Honored Contributor

Re: ll not working

Well -


//
The cat on /etc/mnttab does show a /net listing that I do not see on my other systems. //

This does mean you have an NFS issue. YOu will need to fix your NFS server. What entry do you have corresponding to /net?. Can you ping to that server?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Mark Grant
Honored Contributor

Re: ll not working

I agree with Sridhar here,

I have seen this a few times and it has always been a filesystem corruption. "ls" only needs to read a directory whereas "ls -l" needs to look up the filesystem inodes.

I would attempt to unmount the filesystem and do an "fsck" on it.

Also, just to be sure, you could try your "ls -l" in another filesystem or two and see if it works there.

One more thing, your "/net" is probably an automounted NFS filesystem. By default the auto mount it configured with a /net filesystem which NFS mounts other hosts on your network when you attempt to cd to /net/ assuming it is allowed to.
Never preceed any demonstration with anything more predictive than "watch this"
Amiel Tutolo
Frequent Advisor

Re: ll not working

Thanks for the great responses so far. The /net is what is causing the problems i am usre because I am now try a reboot and it is hanging when trying to mount connect to /net. Is there any easy way out of this? I am going to turn the nfs server off as soon as I can get in because this machine will not need it.
Live, love and laugh
Amiel Tutolo
Frequent Advisor

Re: ll not working

Can I stop the boot where it is trying to do the following:
NFS server (pid1102@/net) not responding still trying

Then can I edit some file to take care of this?
Live, love and laugh
Jean-Luc Oudart
Honored Contributor

Re: ll not working

If you don't mount any remote fs you should turn off NFS client alltogether.

change
NFS_CLIENT=0
in /etc/rc.config.d/nfsconf
and then /sbin/init.d/nfs.client stop

If this is just automount :
change
AUTOMOUNT = 0
in /etc/rc.config.d/nfsconf
and re-start nfs client

Regards
Jean-Luc
fiat lux
Jean-Luc Oudart
Honored Contributor

Re: ll not working

Furthemore
check patch details: PHNE_30168

http://www4.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHNE_30168

Regards,
Jean-Luc
fiat lux
Mark Grant
Honored Contributor

Re: ll not working

Turn off the automounter if you don't use it.

Go into /etc/rc.config.d and have a look at nfsconf. At the bottom you'll find a reference to the autofs and automount. Set them to 0
Never preceed any demonstration with anything more predictive than "watch this"
Sridhar Bhaskarla
Honored Contributor

Re: ll not working

Hi,

Since you already rebooted the server, I would suggest you to get into single user mode. ONce in single user mode do

#mount /usr
#export TERM=vt100

Or whatever appropriate
#mount /var
#clear (make sure it works otherwise you have to set your TERM)
#vi /etc/rc.config.d/nfsconf

Turn-off both NFS_CLIENT and NFS_SERVER (set them to 0). Then get into multi-user mode
#init 3

-Sri
You may be disappointed if you fail, but you are doomed if you don't try