On 11/09/2009 03:27 PM, Shrinivasan T wrote:
Thanks.
. is CWD and .. is previous directory.
Fine.
Why are they mentioned in ls?
ls lists the contents of a directory (by default it assumes, the CWD). Since
every directory (including /) maintains a /reference/ to itself and it's parent
besides maintaining references of all the files within it's 'contents'.
Since all the contents (ie: all the references) of the directory are listed on a
ls, . and .. too show up. "man ls" will tell you that the '-A' option to ls
suppresses this.
why ... and .... are not there?
any specific reason?
because of the reason mentioned above. Every directory contains a reference to .
and .. only. The reason why _only_ these two are present is because any other
contents 'outside' the directory can be derived from these two. So, no
additional 'special cases' are required.
did i make any sense at all ? :)
cheers,
- steve
--
random non tech spiel: http://lonetwin.blogspot.com/
tech randomness: http://lonehacks.blogspot.com/
what i'm stumbling into: http://lonetwin.stumbleupon.com/
_______________________________________________
To unsubscribe, email [email protected] with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc