Skip to main content

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.

326 votes
25 answers
284k views

I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's SEVERE, show the line in red; if it's INFO, in green. What kind of alias can I setup ...
Amir Afghani's user avatar
  • 7,373
442 votes
16 answers
90k views

Noone should need 10 years for asking this question, like I did. If I were just starting out with Linux, I'd want to know: When to alias, when to script and when to write a function? Where aliases are ...
ixtmixilix's user avatar
  • 13.6k
0 votes
2 answers
208 views

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 ...
k0pernikus's user avatar
  • 16.8k
134 votes
36 answers
76k views

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
0 votes
1 answer
136 views

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 ...
PYPL's user avatar
  • 113
1 vote
2 answers
180 views

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, ...
wjandrea's user avatar
  • 722
5 votes
3 answers
2k views

There is a 2022 article by a guy who is a senior developer, and there he has the following alias in his zsh config: alias which='type -a' But zsh has which by default, and if we use this which like ...
jsx97's user avatar
  • 1,387
-1 votes
2 answers
211 views

I'm encountering an issue where I'm unable to execute multiple alias commands at the same time in my shell environment. For example, when I try to run two alias commands together, only one seems to ...
Subhash's user avatar
-1 votes
1 answer
118 views

How is this possible? styx@LouSTyx:…$ GCOM​ "\pushdict now ignores prefix macro." GCOM​ : commande introuvable styx@LouSTyx:…$ type GCOM GCOM est un alias vers « git commit -a -m  »
STyx's user avatar
  • 1
0 votes
1 answer
140 views

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 ...
Ayusman's user avatar
  • 141
0 votes
2 answers
232 views

I have two alias in my Debian's .bashrc: alias upd='sudo apt update && apt list --upgradable' alias upg='sudo apt upgrade' Then I use upd to update and display all upgradable packages, and ...
Rodrigo's user avatar
  • 1,914
225 votes
9 answers
58k views

Let's say I have the following alias in bash - alias ls='ls --color=auto' - and I want to call ordinary ls without options. Is the only way to do that is to unalias, do the command and then alias ...
Mirzhan Irkegulov's user avatar
355 votes
5 answers
305k views

In my ~/.bashrc file reside two definitions: commandA, which is an alias to a longer path commandB, which is an alias to a Bash script I want to process the same file with these two commands, so I ...
Zaid's user avatar
  • 11k
0 votes
1 answer
94 views

I am trying to create an alias for the rm command in the /root/.bashrc file on a VirtualBox Redhat VM (running RHEL 9). I cannot get it to work properly. This is an excerpt of my .bashrc file: alias ...
minionsaregreat's user avatar
1 vote
1 answer
169 views

There are a fair bit of similar questions, but I can't find spec for this particular case. I'm writing a shell script to verify bash configuration. For exmaple, I add test_alias to ~/.bashrc, which is ...
Iorippi's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
62