All Questions
10
questions
2
votes
2
answers
956
views
Why do I have to use this command twice to execute it?
I made an alias alias goto="cd $@ && source ~/.zshrc" and it works, but only if I execute it twice. Even after I execute it twice in one shell, and if I want to move to another dir, ...
3
votes
3
answers
12k
views
Create alias for desktop directory
If I type in cd Desktop, no matter what folder the terminal is currently open in, I want it to navigate to /home/bob-ubuntu/Desktop
In my .bashrc file I have the following lines at the bottom:
alias ...
1
vote
1
answer
3k
views
alias to make a new directory and go to it [duplicate]
So here I've created, or at least tried to create an alias for a command that accepts a command-line argument, makes a new directory with that name, and goes to it.
alias newfolder='mkdir $2 ; cd "$(...
6
votes
4
answers
20k
views
Command line shortcuts for changing directory [duplicate]
I'm looking for an easy way to navigate to directories spanning multiple hard drives and want to set something equivalent to a shortcut within the terminal.
In Windows I would accomplish this with ...
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 ...
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 ~/...
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. ...
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 ...
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 ...
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]/...