Skip to main content

All Questions

Tagged with
2 votes
1 answer
5k views

How can I write an alias for cd such that it will fire ls after going into the directory to which I just cd'ed into? [duplicate]

Lets say I want to do cd home and then ls -lrth. I want these two things combined into a single command. I tried writing an alias, but it didnt work. Can you help me ?
Chani's user avatar
  • 418
8 votes
2 answers
24k views

Creating an alias to Change Directory and have that directory be the current working directory in new terminal tabs

I'm trying to create a convenience alias that will change directories and then start a node server in that directory. I have it working for the most part, there's just one little issue that I can't ...
Scott's user avatar
  • 181
21 votes
4 answers
3k views

Automatically detect when I typed "vi" but meant "cd"?

About 5 times a day, I type "vi" when I meant "cd", and end up opening a directory in vi. It's making me NUTS. It seems like there should be a way to detect when I type in "vi + directory" and ...
Alex's user avatar
  • 323
8 votes
4 answers
9k views

How to create a short path?

We have so many useful folders, which are in different path, for our working in Linux. For example : $ cd ~/Documents/Courses/EDX/physics2013/ $ cd ~/Documents/Company/OpenGL/Proj/... $ cd ~/...
Gapry's user avatar
  • 245
4 votes
4 answers
837 views

Simplified navigation in terminal

I know IDEs are the wave of the future, but I always find myself coding in vim in a Linux terminal. Old dog. New tricks. Anyway, navigation becomes challenging when dealing with long package names. ...
rouble's user avatar
  • 2,001
3 votes
2 answers
2k views

Can I run a command after the user uses Ctrl-C to kill a command?

So at my position we use a shared set of aliases to do builds. Something like... alias 'build'='cd $BUILD_ROOT; m; cp ...; cp...; deploy; deploy; deploy; cd -' This is super irritating because the ...
Hounshell's user avatar
  • 303
3 votes
2 answers
174 views

How can I create a "base" for other aliases to refer to and enable cd base/x command directories?

I have .bash_aliases with: alias c1='cd /home/me/code/php' alias c2='cd /home/me/code/jquery' alias c3='cd /home/me/code/ruby' alias c4='cd /home/me/code/c' How can I DRY this up and loosen the ...
Michael Durrant's user avatar
2 votes
1 answer
1k views

How can I add an alias for my pwd to an existing file?

I want to add another alias to my "aliases" file for the directory I'm currently in (Present Working Directory) I've tried printf "alias aaa=cd " + pwd >> myfile It's close, but I end up ...
Michael Durrant's user avatar
134 votes
36 answers
73k views

Quick directory navigation in the bash shell

I would like to frequently switch between directories that are in totally unrelated paths, for example /Project/Warnest/docs/ and ~/Dropbox/Projects/ds/test/. But I don't want to type cd /[full-path]/...
saiy2k's user avatar
  • 1,603
20 votes
2 answers
11k views

Change directory without typing cd?

Is it possible to make bash change directory in command line simply by typing that directory without any commands like cd? For example is it possible instead of writing this: $ cd /tmp I just want ...
Vladimir's user avatar
  • 310

15 30 50 per page
1
2