[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: shell prompt tip



If your shell is bash then zou can create aliases. Write in .bashrc something
like
 alias cd....='cd ../../..'
This allows you to type cd.... on the command line to go 3 directories up.

Sven

At Sat, 16 Sep 2000 09:40:07 +0100 (BST),
Simon Hales <s.hales@cwcom.net> wrote:
> 
> On Thu, 14 Sep 2000, J.P. Larocque wrote:
> 
> >On an unrelated note, I'm *fairly* new to Linux (or UNIX in general), only
> >having been using it for about a year.  In the DOS command-interpreter 4DOS,
> >I could refer to parent directories as . and .. as is the norm in DOS and UNIX.
> >But I could also type, say, "cd ....", which would be equivalent of typing
> >"cd ..\..\..\".  It could be thought of as going up the directory tree, one dot
> >per level, the first representing the CWD.  Is there any practical way I could
> >make bash expand multiple dots like it would wildcards, passing the full
> >expanded form onto the program being called, without hacking up the source to
> >bash?
> 
> One reason this would not scale well from DOS to Unix, is that
> "..." "...." ".....", etc are in fact perfectly legal filenames under
> Unix/Linux.  In MS DOS, the "." is a special character used by the
> FAT filesystem, and cannot be used in the filename, so "..." etc are
> free to be interpreted by shells and commands such as 4DOS, and various
> replacements for "CD"
> 
> One Debian package I have come across so far that actually does create
> files called "..." is the Crypto Filesystem Daemon, cfsd.
> 
> 
> Regards
> 
> Ahmed
> 
> 
> My ICQ Number is:- 89224228
> 
> Powered by Debian/GNU Linux 2.2 (http://www.debian.org)
> 
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null



Reply to: