ls command not working

Hi,

I have installed opensolaris 10 in VMware. Everything is fine except ls command is not working. It is not displaying any files and directories. Sorry if the question is soo trivial.

Is there any error message? Are you sure that the directory contains files or other directories? Because ls won't display anything that isn't there. You can test it with this:

$ touch foo.bar
$ ls

yeah sorry for giving details. ls is not working even in / ( root ) and also when applied with full path. $PATH is set correctly. It is working when used in GUI but not working when applied in CLI ( commnd line interpreter ).

ls command is not at all working when used in CLI. In opensolaris 10 GUI,
it is working when logged as any user other then root. It is not working when the user is root. sorry for updating the question again n again.

So ls is working when you start it in an xterm (or similar), but returns to the prompt without any output when you start it on the console? Are you starting it as the same user? Is there any difference if you run 'which ls' in the GUI vs the console?

thanks pludi for ur care. there is no difference between 'which ls' in console and gui ( both r displaying /usr/bin/ls ). In xterm, ls is working but after switching to root with su - root, it is not working. In console it is not at all working irrespective of the users.

What happens if you type only ls (enter) as root? Does it give any error message?

It is not giving any error message. Just again it returns to prompt.

What does "alias" tell you?