cd -
I learned of a cool feature in the cd
command, which to my
knowledge works under zsh, bash, ksh and possibly other shells.
cd -
takes you to your previous directory, letting you easily
switch back and forth between two directories. Take /home/ryan
and
/etc
for example:
ryan@lambda:~$ cd /etc
ryan@lambda:/etc$ cd -
/home/ryan
ryan@lambda:~$ cd -
/etc
ryan@lambda:/etc$
Please share any other cool shell tricks you may know :D
Comments: To comment on this post, send me an email following the template below. Your email address will not be posted, unless you choose to include it in the link: field. If your web browser is configured to handle mailto: links, click comment to load the template into your mail client.
To: Ryan Kavanagh <rak@rak.ac> Subject: [blog-comment] /blog/2010-01-29-cd--/ post_id: /blog/2010-01-29-cd--/ author: [How should you be identified? Usually your name or "Anonymous"] link: [optional link to your website] Your comments here. Markdown syntax accepted.
0 Comments