From: Yohanes Santoso Date: 2002-04-03T06:34:04+09:00 Subject: Re: a note on the . and .. discussion patrick-may@monmouth.com (Patrick May) writes: > I just realized that unix commands do not recognize the "." and ".." You're mistaking shell with unix command. The character * is expanded by shell. The invoked unix command does not even know that the user type the character *. The shell does not include ., .., and all files that begins with a .. in expansion of * because by policy, all files that starts with .. is considered hidden. There is no preventing the user to make the shell not to ignore these hidden files: 'grep something .*' Since it is only a policy, there is no guarantee that my favourite shell does not include . and .. in the * expansion. Luckily, no shell has this behaviour. > Adding to the apparent inconsistency -- even the root dir has "." and > ".." entries. I would think that if "." and ".." were to provide .. of / is consistent. It refers to itself. ... of / is to make things convenient. Otherwise, you'd have to put condition everytime you want to use ..: you'd have to check whether the current dir is the / dir. This is inconvenient. > - IMHO, I think that aDir.parent is cleaner than aDir[".."]. I also > think that "." and ".." should continue to be valid "glob" Exactly the argument why Ruby has $* when it already has ARGV. . and ... is such common thing now that it is adopted by most other filesystems in various OSes. So, it's no longer a UNIX only convention. YS.