<p dir="ltr">Why not just `cd ..` ?</p>
<div class="gmail_quote">On 27 Aug 2014 08:00, "Bill Vance" <<a href="mailto:kbun@xpresso.seaslug.org">kbun@xpresso.seaslug.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Howdy Folks;<br>
<br>
While I haven't seen much of it, it seems logical<br>
to me, that this list is not just about problems,<br>
but also bout passing along the, "little goodies",<br>
that we come across.  Well here's one for you.<br>
<br>
Cd-ing down into a long string of directories one<br>
dir name at a time is one thing, but using cd to<br>
try to negotiate back up a few dirs, can be<br>
downright cumbersome.<br>
<br>
Conversely, I've allways liked the way ftp<br>
handled this with it's, "cdup", command.  After<br>
playing with it a while, I think I've found the<br>
most elegant version to date.  After you've<br>
checked it out in a shell, you're probably<br>
going to want to cut/paste it in with the other<br>
aliases in your /home/$USER/.bashrc file. So anyway, here it is.<br>
<br>
  alias cdup='cd $(dirname $PWD)'<br>
<br>
The dirname command simply chops the last name<br>
off of a directory string, in this case, the<br>
Present Working Directory, and there you have<br>
it.  Enjoy.<br>
<br>
Bill<br>
<br>
-- <br>
kubuntu-users mailing list<br>
<a href="mailto:kubuntu-users@lists.ubuntu.com" target="_blank">kubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/kubuntu-users" target="_blank">https://lists.ubuntu.com/<u></u>mailman/listinfo/kubuntu-users</a><br>
</blockquote></div>