New Command (alias)
Bill Vance
kbun at xpresso.seaslug.org
Wed Aug 27 09:52:24 UTC 2014
Never seen that one before. I guess there's a
zillion ways to do most anything.....:-)
Bill
On Wed, 27 Aug 2014, Loïc Grobol wrote:
> Why not just `cd ..` ?
>
> On 27 Aug 2014 08:00, "Bill Vance"
> <kbun at xpresso.seaslug.org> wrote:
>
> Howdy Folks;
>
> While I haven't seen much of it, it seems
> logical
> to me, that this list is not just about
> problems,
> but also bout passing along the, "little
> goodies",
> that we come across. Well here's one for you.
>
> Cd-ing down into a long string of directories
> one
> dir name at a time is one thing, but using cd
> to
> try to negotiate back up a few dirs, can be
> downright cumbersome.
>
> Conversely, I've allways liked the way ftp
> handled this with it's, "cdup", command.
> After
> playing with it a while, I think I've found
> the
> most elegant version to date. After you've
> checked it out in a shell, you're probably
> going to want to cut/paste it in with the
> other
> aliases in your /home/$USER/.bashrc file. So
> anyway, here it is.
>
> alias cdup='cd $(dirname $PWD)'
>
> The dirname command simply chops the last name
> off of a directory string, in this case, the
> Present Working Directory, and there you have
> it. Enjoy.
>
> Bill
>
> --
> kubuntu-users mailing list
> kubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
>
>
>
More information about the kubuntu-users
mailing list