1830362 Members
2369 Online
110001 Solutions
New Discussion

ls and ll

 
Michael_33
Regular Advisor

ls and ll

Hi all,

I cd /user123, when I do a #ls, there is a file or directory called abc, but when I #ll abc
it said," not found", how come?

#file abc
got " can not open"

Any ideas?
Thanks!
9 REPLIES 9
Patrick Wallek
Honored Contributor

Re: ls and ll

The directory was probably created with some unprintable characters at the end of it.

Try doing an

# ll abc*

and you will probably be able to see the contents of the directory.

#ll -d abc*

Will show the details of the directory itself.

Michael_33
Regular Advisor

Re: ls and ll

#ll -d abc*

"abc not found "

any idea?
Sukant Naik
Trusted Contributor

Re: ls and ll

Hi,

Is this directory a nfs mount point?

I have faced this problem, when I am doing a nfs mount and not able to use ll command.

The solution is unmount the filesystem and mount it again.

-Sukant
Who dares he wins
Michael_33
Regular Advisor

Re: ls and ll

this directory is not a nfs mount point
Sukant Naik
Trusted Contributor

Re: ls and ll

Hi Michael,

If it is not nfs mounted, then did you try

# ll *abc*

Please dont laugh....;-)

-Sukant
Who dares he wins
Olav Baadsvik
Esteemed Contributor

Re: ls and ll


Hi,Let us assume that your problem is that you have strange characters as
part of the file-name.

To a certain degree you can check this using this method:

cd /user123
ls -li > lsi.out
vi lsi.out
In vi give this command: :set list
You will then see special characters like space, tab etc.

Still assuming that strange characters is the problem, you may
correct it in this way:

cd /user123
ls -li
In the first column you will see the inode-number for abc
You then use this inode-value in find to change the name abc
to something new:
find . -inum -xdev -exec mv {} newabc \;

Regards
Olav


Peter Kloetgen
Esteemed Contributor

Re: ls and ll

Hi Michael,

you mentioned that ls shows you abc but ll abc does not work. Does ls abc show you the file/directory?

Did you try ll *a*b*c* as well?


Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Justo Exposito
Esteemed Contributor

Re: ls and ll

Hi Michael,

Try this:

file *
ls |od -c

And please put the results here.

Regards,

Justo.
Help is a Beatiful word
Michael Tully
Honored Contributor

Re: ls and ll

I've seen this problem before when you may have execute permissions for the directory but not read permissions. It could also be that the permissions were changed after you changed into that directory.
Anyone for a Mutiny ?