ls -l displays output with an error

when i use ls command it works normal but when i using additional parameter with ls like ls -l , ls -a... it shows a error followed by the output.

# ls -l
./hgfs: Operation not applicable
total 12861
-rw-r--r--   1 root     root           0 Jun  1 21:12 1
drwxr-xr-x   2 root     root         512 Jun  2 20:02 Desktop
drwxr-xr-x   2 root     root         512 Oct 16  2010 Documents
-rw-r--r--   1 root     root          47 Nov 29  2010 b.txt
lrwxrwxrwx   1 root     root           9 Oct 16  2010 bin -> ./usr/bin
drwxr-xr-x   7 root     sys          512 Oct 16  2010 boot
drwxr-xr-x   4 root     nobody       512 May 29 11:25 cdrom
-rw-------   1 root     root     6394517 Jun  2 21:42 core

this error came after i edited /etc/profile and /etc/skel/.profile file. i just added enteries into this file to change my prompt view. boot when i saw this error appearing i removed those enteries and rebooted my system . but still this error shows up. but when using simple "ls" command it wont throw error. error comes when using additional parameter with ls.. i am using solaris installed in vmware.

May be you aliased ls or changed PATH? Look at:

which -a ls

# which ls -l
/usr/bin/ls
no -l in /usr/sbin /usr/bin
# which ls -ltrh
/usr/bin/ls
no -ltrh in /usr/sbin /usr/bin

/hgfs is a mounted file system. i umounted it and tried ls -l it worked corrected. but when i try to remount it it showed no such mount point. when i reboot my system it is mounted back but ls -l again shows the error.

Excuse me:

which -a ls

It gives you information about all "ls" in your system. But the problem may be in your mount options but I never work with hgfs. Sorry, here I can't help.

1 Like

Okay Np.
Thanks Yazu..