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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
93 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
108 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
-1 votes
2 answers
166 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
0 votes
1 answer
70 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
0 votes
2 answers
155 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,904
0 votes
2 answers
150 views

I probably approach this problem wrong. I update my Linux machines with bash aliases like: alias upg-pi='\ssh -c [email protected] -C -i $ssh_identity -o ConnectTimeout=$ssh_timeout root@$...
Vlastimil Burián's user avatar
-1 votes
1 answer
90 views

I have the following aliases in my zsh: alias -- -='cd -' alias ..='cd ..' alias ...='cd ../..' When I switch to fish, by manually typing fish and pressing Return, the first alias causes an error: - (...
jsx97's user avatar
  • 1,377
0 votes
1 answer
126 views

My login shell is zsh. I have added the following two lines to my .zprofile file: path+=$HOME/foobar123 alias foo='echo bar' Then, if I switch to bash or fish, by typing bash or fish and pressing ...
jsx97's user avatar
  • 1,377
0 votes
1 answer
69 views

I have a script downloaded from the Internet, the beginning of which looks like this: echo "alias myip='curl -s https://api.ipify.org/'" >> ~/.bash_profile echo "alias myiplookup='...
jsx97's user avatar
  • 1,377
0 votes
2 answers
130 views

I have the following alias defined in my .bashrc alias lsfc='ls -l "$@" | tee /dev/tty | grep -v / | echo "File count: `wc -l`"' which is intended to give me the number of ...
David Shaw's user avatar
-1 votes
1 answer
185 views

I'm trying to create a function to translate words via a custom script: function mean() { ~/scripts/translate.sh $1 } I would prefer the function to be named tr, as it is much shorter and faster ...
algonell's user avatar
0 votes
1 answer
124 views

I am writing a script that would automatically suggest some new aliases/functions to be added to a user's shell config. Before doing that, however, I would like to make sure the aliases being ...
zoickx's user avatar
  • 51
1 vote
2 answers
248 views

I am a long-term a Windows user, so I find the syntax of the ren command both simple and convenient: ren C:\pathTo\myFile\oldFileName.txt newFileName.txt [Update 24 July 2024] To be clear about my ...
ps.pf's user avatar
  • 13
3 votes
2 answers
399 views

I'm trying to set the fish history pager to be bat -l fish for syntax highlighting. (i.e. set the PAGER environment variable bat -l fish just for the history command). I tried: # 1: alias history &...
matan h's user avatar
  • 149
2 votes
0 answers
48 views

Here is a simplified implementation of an issue in my bash/zsh aliases file: alias foobar='echo bar' # this is out of my control if true; then unalias foobar echo we got inside the conditional ...
Adam Katz's user avatar
  • 4,202
0 votes
2 answers
154 views

I have a program that tries to trigger a screenlock using the following commands: xdg-screensaver lock xscreensaver -lock cinnamon-screensaver-command --lock The problem is that I'm using ...
guttermonk's user avatar
0 votes
1 answer
96 views

Is there a way I can use bash aliases from my .bash_aliases file within a shell-scripts? I thought of something like including source "$HOME/.bash_aliases into my script but it does not work.
nath's user avatar
  • 6,094
0 votes
1 answer
248 views

WHen I use the pwd command, it prints e.g /opt instead of /opt/. I would like it to print the trailing slash. However, I tried adding the following line to my ~/.bash_aliases file: alias pwd=" ...
K.defaoite's user avatar
1 vote
1 answer
301 views

I'm running Artix Linux and using zsh, and these two aliases return no matter how many times I unalias them or remove them from my aliasrc: run-help=man which-command=whence And they don't exist in ...
swishkin's user avatar
0 votes
1 answer
116 views

tl;dr how can I substitute a string (i.e. a youtube/streaming url) in an alias such as alias mpvyt='yt-dlp <URL> -o - | mpv - ' ? I live in a mezzanine studio using a M1 macbook for a ...
sylvansab's user avatar
  • 109
2 votes
1 answer
266 views

I had a tcsh alias as follows: alias cdd 'cd `dirname \!*`' I use this to change the directory to the one containing a certain file. For instance, cdd /Users/myself/Document/Folder/File.pdf would ...
leparc's user avatar
  • 23
1 vote
3 answers
1k views

I'm using a server where I'm a common user (non-sudo). I access the server through ssh. Here's the output of some commands run on the server: [username@machinename: ~]$ ps -p $$ PID TTY ...
pvt's user avatar
  • 13
1 vote
1 answer
611 views

I am creating a bash alias (or possibly a script) to ban and unban IP addresses with fail2ban on Ubuntu 20.04. The bash syntax I am using to unban IP address is: fail2ban-client set YOURJAILNAMEHERE ...
DanRan's user avatar
  • 113
0 votes
0 answers
99 views

Goal My server manages jobs using SLURM. Each job in the queue has a job ID, which can be either a single integer or two integers separated by an underscore, e.g., 123_4. You can use scontrol show job ...
Jamin's user avatar
  • 1
0 votes
1 answer
383 views

I am trying to execute the following, with no success getting either the 'py3start' or the 'py3test' alias commands recognized - (I introduced the 'py3test' for testing purposes to check if setting ...
aeon's user avatar
  • 1

1
2 3 4 5
19