View Single Post
Old 07-13-2013, 12:33 AM   #233
BWinmill
Nameless Being
 
Quote:
Originally Posted by PeterT View Post
And of course a directory entry is just another type of file, so .... it's just being consistent in treating all entries that start with a period as hidden.
I remember using an older version of Unix where you could read a directory like a file, which was kinda fun. (I just tried under OS X, Linux, and NetBSD. Alas, it doesn't work on those systems.)

It also sort-of explains why you can do something like this:

Code:
$ mkdir -p 1/2/3
$ chmod 100 1
$ ls 1
ls: 1: Permission denied
$ cd 1
$ ls
ls: .: Permission denied
$ ls 2
3
Weird stuff.
  Reply With Quote