In computing, an alias is an alternate name for an object, such as a variable, file or device.

learn more… | top users | synonyms (1)

3
votes
3answers
556 views

git alias for merging current branch with master

I'm trying to create a git alias that merges the currently checked out branch into the master branch. Specifically I'd want to quickly get my master branch get up to speed with what I'm working on. ...
0
votes
3answers
43 views

create alias for existing hostnames

the question has been asked numerous times but I cannot find a clear answer. I have a database on Azure: gtxxxxxxx.database.windows.net however, to make things more easy (I hate typing) I would ...
0
votes
0answers
28 views

Does Apache Alias supports relative paths?

I'm trying to alias a file with relative path from the document root, like this: Alias /js/jquery-1.9.1.min.js lib/jquery-1.9.1/jquery-1.9.1.min.js It does not work, but I can't find anything in ...
1
vote
1answer
26 views

ZSH Cull Old Aliases

When I call alias in a zsh shell, I get a list of aliases. Some of them are desired, some are not. I originally created a .alias file in my home directory, and added source $HOME/.alias to my .zshrc. ...
0
votes
1answer
31 views

SSMS view designer - how do I give a table an alias?

I'm struggling with getting SQL Server Management Studio to do what I want. Things that were totally simple and easy tasks in Enterprise Manager have inexplicably become hard or impossible. Case in ...
1
vote
1answer
46 views

alias not working with my mongo --eval command

I have the following mongo shell command to delete all users that aren't admins mongo --eval 'db.users.remove({group:{$ne:"admin"}})' collection This works. I want to create an alias for this ...
0
votes
1answer
11 views

How to use aliases for catalogs for file creation navigation

if I have some aliases like Catalog1 (/home/ed/1), Catalog2 (/home/ed/2) I have scripts in Catalog1, and Catalog2 is for output saving, f.e. : python /home/ed/1/one.py > /home/ed/2/log1.txt i ...
0
votes
1answer
25 views

pass arguments to alias then disown

I am trying to create a simple alias: alias draw="pinta &> /dev/null & disown" The intent here is pretty obvious. My problem is that whenever I pass an argument, I get bash: disown: ...
0
votes
1answer
39 views

How to remove zsh alias?

I have an alias which is predefined by an oh-my-zsh plugin. -> % alias gcm gcm='git checkout master' I'd like to remove it, i.e. I'd like alias | pcregrep "\bgcm\b" return 1. I've tried with ...
-1
votes
1answer
81 views

How to copy from couple folders back to the current directory?

I just came to an interesting question in Linux. I want to find a shortcut for copying from multiple folder back in the path to the current path. For example: A/B/C/D/E> cp ../../../example.txt . ...
0
votes
0answers
14 views

How to colorize the output using sed - no GNU tools available

I'm using a short alias in my .profile file to colorize the output of the sdiff command, just to make it easier to spot differences. The alias is like this: alias color_diff="sed 's/[|< |> ...
0
votes
0answers
24 views

Getting error “the account lasse@vkarlsen.no is disabled” when sending email to google groups from gmail

Apologies if this has already been answered but the very nature of the error message, mixing the message with my email makes it nearly impossible to find information about it through Google. I tried ...
2
votes
2answers
65 views

How do I handle multiple quotes in an alias (for bash or zsh)

I am using zsh, and I am trying to use python as a simple calculator. I'm very familiar with python, but can't seem to get the alias (or function) to work properly. So far I've got: pycalc() { ...
0
votes
2answers
153 views

Unable to create a permanent alias in Mac OS

In Linux I can well to add alias to bashrc and it will become a permanent alias. In Mac OS I tried to do the same thing: vim ~/.bashrc export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH f or ...
1
vote
1answer
32 views

Echoing aliases to .bashrc

I want to echo an alias straight into my .bashrc file. Here is what I am using: echo alias cdear='cd | clear' >> .bashrc However, the new line in .bashrc does not contain the quote marks. I ...
0
votes
1answer
83 views

bypass 'noglob' for 'which' in zsh?

I want to use the 'which' command to see which executable is actually being invoked, but the defensive 'noglob' aliases keep getting in the way. Is there a shortcut that I can use to find which ...
1
vote
1answer
48 views

ssh port forwarding and multiple aliases

I have the following ~/.ssh/config file: $ cat ~/.ssh/config Host myalias HostName fully.qualified.domain.name Port 2222 LocalForward 3690 127.0.0.1:3690 When I ssh to myalias, ...
0
votes
1answer
2k views

iptables trouble: nat with ip alias (virtual interface) not working

I'm setting up an Ubuntu 11.10 server to act as firewall for a network running several different SSL websites. The idea is fairly common: have all public IP's for each site aliased to the public ...
0
votes
1answer
429 views

On Mac, why doesn't alias la 'ls -la' work?

When I run alias la 'ls -la' I get the error: ls: alias: no such file or directory How do I alias la to ls -la?
1
vote
2answers
21k views

How do I set an alias name in the hosts file?

I have a production server, on which three different application are running. I need to configure aliases for that server, according to which application needs to be accessed by the user. How do I ...
0
votes
1answer
27 views

Alias not working

I have an alias that does an ssh into a machine and executes 1 line of code as following: alias posts-update= 'ssh user@host.com "cd /var/www/blog/posts && git pull"' This works perfectly ...
-2
votes
1answer
31 views

Remove an alias on Windows 8?

I've set an alias for a command and now I want to remove it again. How would I go about that? I've already tried unalias, but that doesn't work.
0
votes
1answer
24 views

What happens when we alias an IP address to a system?

What happens when we alias an ip addr which is already allotted to some other on the same LAN. Is aliasing local to my system?
13
votes
9answers
9k views

Command aliases in Command Prompt?

How can I make command aliases in Windows' Command Prompt like I would with bash? I found out about doskey in a forum thread, so I can do something like: doskey ls=dir /b ...and now the command ls ...
0
votes
1answer
26 views

Where to put alias commands for use in Windows 7 [duplicate]

I know you can add alias commands in Linux to the .bashrc file, but Window 7 definitely does not use bash. Where and how can I add alias commands for use in the command prompt cmd.exe?
2
votes
4answers
2k views

Linux: aliases when using `screen`

I'm using screen, and I have several aliases in my ~/.bash_profile, for example python=python-2.6. But for some reasons these aliases don't work when I work in screen. How can I make them work?
2
votes
2answers
57 views

alias or function for emacs command?

So I'm on my first day at my new job, and on the server we use, the default emacs is X-windows based. I much prefer using it in the good old terminal, and I'd like to be able to make the command ...
2
votes
2answers
434 views

How can I set up an alias or shortcut to do the *nix find command?

When at the command line, I find that I have to type out this command very often: find . -iname "*php" -exec grep -H query {} \; I'd love to set up an alias, script, or shortcut to make it work ...
0
votes
0answers
18 views

goto inside alias is working only in one way

Why this is not working? #!/bin/csh goto skip_background run_in_background2: echo inside background goto back_from_backgroung skip_background: echo skipped alias run_in_backgroundx 'echo aliass \ ...
3
votes
2answers
2k views

How do I close an OS X application from the command line using a alias defined in my .bash_profile?

I found the following shell script that can be used to tell an OS X application to quit: #!/bin/sh echo | osascript <<EOF tell application "$*" quit end tell EOF I have several simple ...
1
vote
2answers
39 views

Remote login in, creating alias, need advice

I usually remote login to the server at my school. I have a user name and password. The command is 'ssh -l username -p port machineName'. (username is mine, port is a number and machineName is the ...
2
votes
1answer
163 views

How to make an alias to a part of a block device

Is it possible to make a part of a block device to be seen as a separate block device (in a similar way block 'devices' are created for partitions)? Unfortunately, I can't mount it through loop device ...
1
vote
3answers
113 views

How to write alias to use first parameter or * if parameter is blank?

I want to write an alias command for 'ls', so that if I pass in a parameter, then the alias will use it, but if I do not, then it would use '*' instead. This is the alias I have today: alias lsd='ls ...
1
vote
1answer
425 views

My alias isn't working anymore, not sure what happened

I created an alias so that when I type la it does ls -la. When I fire up terminal on my Mac, I get: -bash: alias: la: not found -bash: alias: =ls -la: not found Why would this be? My ...
0
votes
1answer
714 views

Create Command line shortcuts in Windows 7

I'm using jsDoc to create documentations for my JavaScript files. The command I use is > java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js What I want is to create a batch or ...
0
votes
2answers
214 views

Shell function in .bashrc is not recognized

I know this must be something silly but somehow I am stuck trying to create a shortcut (alias) for a shell function. Here is my exact .bash_profile: [[ -s "$HOME/.rvm/scripts/rvm" ]] && source ...
1
vote
3answers
3k views

Syncing aliases via Dropbox and having them work on both Macs

I'm currently syncing my Desktop folder between two Macs using Dropbox. The Desktop folder in my Mac's user folder is an alias to the folder in my Dropbox. This works fine. On one Mac, I created an ...
3
votes
3answers
2k views

Add a static IP alias to a DHCP interface on Windows 8

I have a Windows 8 machine that has only a single Ethernet port. It needs to use DHCP and also needs a static IP. Each IP is in a different subnet, and each serves a different, incompatible purpose. ...
0
votes
2answers
96 views

Setting up an alias that waits for the next prompt to enter a command

I'm trying to set up an alias that connects to an ftp site.. so far (with the help of SO :] ) I've been able to create the alias that will connect. I've tried adding the next command preceded by a ...
2
votes
2answers
247 views

Working shell command doesn't alias

I can run, svn status |grep -v .jasper$ |cut -d ' ' -f8 |sed '/.*\..*/!d' |xargs ls -altr --color=auto just fine. But when I go to add this as an alias (alias svtr="...") I get an error saying... ...
0
votes
1answer
70 views

How to make an alias and work in sh for all users (not in bash)?

My question maybe is silly, but how can I make an alias so as to work in sh for all users? I know that I can put an alias, let say this one: alias ls='ls -l' in /etc/bash.bashrc so as to work in ...
0
votes
1answer
68 views

nested aliases in /etc/aliases: which order?

my /etc/aliases (ubuntu 12.04 lts) already contains some aliases redirecting to root: postmaster: root clamav: root monit: root now I want to add another alias that redirects all root messages to ...
1
vote
1answer
2k views

Alias for multiple sequential commands?

How do I create an alias c that will cd and then immediately ls? alias c='cd; ls' Is there some kind of way to insert a special variable that represents the input? Or is that not the way that alias ...
1
vote
2answers
61 views

Alias for directory using a symbol

I'm looking to set up an alias for my work directory, which can change as I change context, and I was trying to find something that was short enough to stand in as a replacement for ~. I'd be tickled ...
1
vote
1answer
58 views

Where is virtualenv's deactivate defined?

Virtualenv defines an alias for the command deactivate as seen in yourvirtualenv/bin/activate.csh. What I'm curious about is where deactivate resides, because when I issue an alias command deactivate ...
3
votes
4answers
6k views

Under Ubuntu, how can I place a shell alias command that will be global to everyone?

Under Ubuntu 9.10, where can I place an alias command that will be valid to all users, root or otherwise, and that will work with a shell under GNOME as well as an ssh session and plain console login ...
8
votes
5answers
6k views

IP address alias assigned by DHCP

I would like to create several aliases to eth0, but have the addresses assigned by DHCP instead of being set to static IP's. Is this even possible? All the examples I've seen assign a static IP using ...
2
votes
2answers
1k views

Bash alias with piping

I'm not exactly sure what I'm doing wrong with this one. I'm trying to run the command alias localip='ip -4 -o addr show eth0 | egrep -o '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}' | head -n 1' If I ...
0
votes
0answers
58 views

How to read aliases in a ksh script

I have some global aliases defined in my ~/.profile file. To read them from a bash script, I'd use: shopt -s expand_aliases source ~/.profile However, in ksh this does not work because it does not ...
2
votes
2answers
146 views

Is this alias any useful?

I am going through and old .cshrc file and it contains the following alias: alias pwd 'echo $cwd' How is that useful? I used to think that this is how pwd might have been implemented. But looks ...