Path: utzoo!mnetor!uunet!steinmetz!vdsvax!barnett From: barnett@vdsvax.steinmetz.ge.com (Bruce G. Barnett) Newsgroups: comp.unix.wizards Subject: Re: A suggestion: .... == ../../.. Message-ID: <4221@vdsvax.steinmetz.ge.com> Date: 19 Apr 88 11:22:08 GMT References: <75@vertical.oz> Reply-To: barnett@steinmetz.ge.com (Bruce G. Barnett) Organization: General Electric CRD, Schenectady, NY Lines: 42 In article <75@vertical.oz> greg@vertical.oz (Greg Bond) writes: |This generalises: . = current dir, .. = parent dir, ... = grandparent etc. | |This could be done in the shells (but only in restricted cases, |similar to ~expansion). It would more usefully be done in the kernel |routine (namei?) that maps names to inodes (where the symbolic links |are traversed). The beauty of the current implemenetation is that the file system does most of the work. That is, the files '.' and '..' are really there. ANY process can make use of those files. You can always put the files '...' and '....' in there if you wish. True - this would need some sort of kernel mod if you wanted mkdir(2) to automagically add those files. I think there are better ways of being lazy - myself. Csh example 1: alias '..' 'cd ..' alias '...' 'cd ../..' alias '....' 'cd ../../..' Csh example 2: use cdpath set cdpath = ( .. ../.. ../../.. ) then when you type cd a the system will check for ./a ../a ../../a ../../../a Quote for the day: "If's you're lazy, don't modify the kernel' :-) -- Bruce G. Barnett uunet!steinmetz!barnett