Operating System - HP-UX
1824821 Members
4135 Online
109674 Solutions
New Discussion юеВ

Unable to execute ls / ll command

 
Abhijeet_3
Frequent Advisor

Unable to execute ls / ll command

I have installed hp-ux 10.20 on D330 server.

But after installation I could not able to execute list command ( ls / ll ) console as well as through telnet.

Anyone has any idea , or else I need to reinstall this server again ?

Looking for your reply.

8 REPLIES 8
RAC_1
Honored Contributor

Re: Unable to execute ls / ll command

Check the permissions.

ll /usr/bin/ls (should be owned by bin:bin with perms read, execute for all)

Check permissions on /usr/bin
There is no substitute to HARDWORK
Tim Adamson_1
Honored Contributor

Re: Unable to execute ls / ll command

Could you provide more information

What is the message you get when you try to issue the ls or ll command?

What is your PATH environment variable set to?

Do the ls and ll commands exist in /sbin and /usr/bin?


Tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Abhijeet_3
Frequent Advisor

Re: Unable to execute ls / ll command

path is set to /usr/bin ,

When try to executing ls /ll command , no error , only cursor hangs , so need to Control+C ,

Unable to see file permission as ll command itself is not working.

James Murtagh
Honored Contributor

Re: Unable to execute ls / ll command

Hi,

There are quite a few things you can check. first ensure the ls you are trying to run is indeed the /usr/bin/ls executable. Run:

# type ls

It will tell you what you are actually running. If its set to the correct path try /sbin/ls. If this works use chatr to check /usr/bin/ls is linked properly:

# chatr /usr/bin/ls

If neither ls works you can use echo to mimic the ls command as a workaround:

# echo *

I would then use swverify to check the state of the install:

# swverify \*

Check /var/adm/sw/swagent.log for the results of this. Attach any output if you are unsure.

Also, seems a bit strange to be installing 10.20 at this time?

Cheers,

James.



Tim Adamson_1
Honored Contributor

Re: Unable to execute ls / ll command

Hi,

Why not try to use absolute path as follows:

# /usr/bin/ls /tmp

Maybe you are trying to list an NFS directory that is having problems.

What directory are you trying to list?
Can you list /tmp or / ??

Are there any messages in syslog.log?

Also check to ensure all filesets are configured:

# swlist -l fileset -a state | grep -v configured | grep -v "^#"

The above command should return a blank line. If you get anything else, then you have filesets that are NOT configured. This is not necessarily a problem if they have been superseded by more recent filesets that are in a configured state (typically applies to patches).

If you get filesets in an installed state, you can configure them using "# swconfig \*" command. Any other state is a different problem.


Tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Abhijeet_3
Frequent Advisor

Re: Unable to execute ls / ll command

Thanks James ,

After analyzing installed software , using swverify , I get error message , File /usr/bin/l missing , & related fileset had a error.

Now I will reinstalled this fileset .
Bruno Dostie
Advisor

Re: Unable to execute ls / ll command

do you have a non-responding nfs mount point in your root "/" filesystem ?

I ran into problem some weeks ago.

umount non-responding filesystems.

good luck.

Bruno
DOSB
Bruno Dostie
Advisor

Re: Unable to execute ls / ll command

do you have a non-responding nfs mount point in your root "/" filesystem ?

I ran into problem some weeks ago.

umount non-responding filesystems.

good luck.

Bruno
DOSB