move you up one directory quickly

alias ..='cd ..'

By: kev
2011-10-28 10:12:57

4 Alternatives + Submit Alt

What Others Think

Bash: "cd -" - done.
manuelj · 556 weeks and 5 days ago
Or cd .. alone. The proposed command is like killing a robin with a bazooka :)
nzimas · 556 weeks and 5 days ago
Am I missing the point? cd .. = Go up one directory, from where I am. cd - = Go back to my previous cwd, no matter where it was cd = Go to the home directory of the current user The proposed command seems to be the only one that will "move to parent directory" i.e. one directory up from where I am. Did you all read the command and think about it before you slammed this person with 12 negative votes???
SuperFly · 556 weeks and 4 days ago
I see the first comment ("cd -") is totally off-topic, but don't be hungry it may happen... I am afraid the reason of (currently) -12 is because the command is a copy exact of eimantas' command (currently +2), did you see? it was written in 2009!
ztank1013 · 556 weeks and 4 days ago
it get's even more useful with plenty of them: alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..'
titus · 556 weeks ago
Careful! If you are a user of FOR loops, you could shoot yourself in the foot here. for I in {1..10} do; scp somefile.conf me@server$i; done
Karunamon · 556 weeks ago
@Karunamon: '..' only works when it's at the start of command
kev · 555 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: