Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Linux/Unix, if I am inside a directory of another user, but cannot view the contents of the directory by typing "ls," how do I get a copy of all the files?
Is the only way to guess what the file names are?

share|improve this question
up vote 3 down vote accepted

In Linux/Unix, a directory is itself a kind of file that can only be modified by special system calls. Like any other file, access to it is controlled by file permissions.

Looking at it in terms of actually implementation, your question boils down to "how do I read a directory file I can't read?" I'm not making fun of your question — I'm just trying to explain why the answer is a definitive "no".

share|improve this answer
I suppose it's indeed silly, but it's nice to know for sure! thanks – Trevor Hickey Nov 27 '12 at 5:07
The way you asked the question is not silly. The way I rephrased your question makes it look silly, but I did that to make the logic clear. – Isaac Rabinovitch Nov 27 '12 at 8:11

You need to have super-user priviledges (a.k.a sudo) to do that.

sudo ls /home/Peter/

(if you want to view Peter's files)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .