Questions tagged [alias]
An alias is essentially nothing more than a keyboard shortcut, an abbreviation, a means of avoiding typing a long command sequence. This can save a great deal of typing at the command-line and avoid having to remember complex combinations of commands and options.
927 questions
4
votes
4
answers
13k
views
Create an alias or shortcut command to run programme in ubuntu
How can we create an alias or shortcut command to run a programme in Ubuntu, I have to start multiple sessions of intelliJ and eclipse, every time I restart my computer I have to got to each directory ...
0
votes
1
answer
3k
views
grep alias to safely ignore multiple directories
The day to day usage is:
grep -rIn pattern directory
There are some files that I want to avoid, they are in directories that have this kind of path in them at some point: app/lib/bower/lodash, app/...
74
votes
13
answers
94k
views
Show only hidden files (dot files) in ls alias
I'm using the command
ls -a | grep '^\.'
for showing only the hidden files.
I added the line
alias hidden='ls -a | grep '^\.'' # show only hidden files
to .bash_aliases file
but this does not ...
32
votes
9
answers
23k
views
show only physical disks when using df and mount
When I use df or mount, I'm most of all interested in physical disk partitions. Nowadays the output of those commands is overwhelmed by temporary and virtual filesystems, cgroups and other things I am ...
2
votes
1
answer
2k
views
Is it possible to give alias name to ip address with port number in CentOS 7
I have one question regarding given alias to ip address with port number.
For example I am executing jenkins in my local system in port number 8080 and nexus in port number 8081.
I will accessing ...
2
votes
5
answers
7k
views
How to add an alias without directly editing the `bash_aliases` file?
Is there a way to add an alias from the command line without directly editing the bash_aliases file? To clarify, how can I make a bash script do it without having to enter something along the lines of ...
0
votes
1
answer
3k
views
Use aliases as custom commands in terminator
I am using a terminator layout to start multiple terminals, and would like to call an alias at each terminal start which is defined in my .bash_aliases (called by both .bashrc and .profile). ...
142
votes
10
answers
66k
views
How do I get bash completion for command aliases?
I am looking to get tab-completion on my command line aliases, for example, say I defined the following alias :
alias apt-inst='sudo aptitude install'
Is there a way to get the completions provided ...
5
votes
4
answers
5k
views
Does Bash and Zsh have a mode to echo what the alias expands to upon pressing Enter?
For example, if I have a
alias dbmigrate='rails db:migrate'
is there a mode or simple way to configure in Bash and Zsh so that when I type in the shell:
$ dbmigrate # press Enter
it will echo what ...
0
votes
1
answer
136
views
How to wrap source command in tcsh
I need a solution only for tcsh.
Say I have a source file that sources other files which in their turn can source other files. My goal is to track which files were eventually sourced. One way I can do ...
134
votes
36
answers
76k
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]/...
0
votes
2
answers
208
views
How to prevent side effects when using an alias (e.g. cat aliased to batcat)?
I want to alias cat to batcat. Yet I do not want to break any script on my system that may depend on cat.
How to ensure that it won't break existing scripts?
I am on an Ubuntu machine on a bash ...
1
vote
2
answers
180
views
How can I temporarily bypass an alias of a keyword in Bash?
If I alias a keyword, I can't figure out how to bypass it.
$ alias if='echo "GOTCHA!"; if'
$ if true; then echo y; fi
GOTCHA!
y
The usual tools for bypassing an alias, like escaping, ...
1
vote
2
answers
2k
views
Creating an alias for the find command in Linux
I have created the following alias in my .bashrc file:
alias find='find . -type f -name'
This obviates the need to type . -type f -name every time I do a file search. However, I still have to enclose ...
0
votes
1
answer
140
views
Unavailable executable still remains
Please note: This is not a question related to pip or python.
I am trying to make sense of why I see a "permission error" instead of "path not found" error.
I have done many ...