Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have to add my thanks and appreciation for your wonderful site... People who frequent the site are the two best things - nice and smart..."

Geography

Where in the world do Tek-Tips members come from?
Dagon (MIS)
18 Apr 08 5:43
I'm using Sun Solaris and I find that if I cd to one particular directory and do an ls, no files are listed.   It doesn't matter what options I use on the ls command (I've tried -l, -f, -a).   Adding an argument like a filename or directory makes no difference.

However, if I do cd .. and then list the directory using "ls dirname", I can see all the files.  Likewise, if I cd to a subdirectory and do ls .., it's fine.   The ID I'm using owns the directory but not most of the files in it.   If I log in to the account which does own the files, the ls works correctly.

Protections on the directory seem reasonable.   It's drwxrwxr-x and the fles are mostly -rwxrwxr-x.   The two IDs are in the same group, so should be able to see each other's files.   I suppose it must be a problem with protections but it's odd that I seem to be able to list the contents from outside the directory but not when I'm in it.

 
Helpful Member!  hoinz (MIS)
18 Apr 08 7:28
This may be a silly question, but is there a file named ls in the directory in question?
And what is your $PATH variable?
Dagon (MIS)
18 Apr 08 9:19
Yes, that's it.   I just did an "rm -ls" and it now works fine.   I should have thought of that !

 
Annihilannic (MIS)
18 Apr 08 18:39
Well guessed hoinz!

Dagon, you should probably remove '.' from your PATH as it is risky for reasons like you just discovered.

Annihilannic.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close