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

learn more… | top users | synonyms (1)

0
votes
1answer
721 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
3answers
1k views

Launch application from bash terminal then kill terminal while leaving application running

I would like to use the following scenario for my favorite applications under Linux (Ubuntu 10.10) in order to save grabbing the mouse and clicking them: Open a terminal (Ctrl-Alt-D) Type my alias ...
0
votes
2answers
450 views

Symlink to Files & Dirs in Dropbox

I just installed Dropbox on my Mac, so now I have this Dropbox folder in my home directory. I only have the free plan (2 GB), so I can't just throw all my files & directories in there. I ...
36
votes
2answers
6k views

how to expand aliases inline in bash?

Is there a way to expand aliases inline in bash? $bash>alias ll='ls -l ' $bash>ll<tab> $bash>ls -l
2
votes
2answers
341 views

How to make an alias from a statement with many : " and many : '

How to make this an alias in zsh? svn status | grep "^?" | awk -F " " '{print $2}' | tr "\n" "\0" | xargs -0 svn add I know it should be something along the lines: alias sall = "the command" ...
6
votes
3answers
351 views

Is there a convenient method to pull files from a server in an SSH session?

I often SSH into a cluster node for work and after processing want to pull several results back to my local machine for analysis. Typically, to do this I use a local shell to scp from the server, but ...
0
votes
4answers
1k views

Is there a way to alias a multi-worded command in Unix?

I am trying to alias the command sudo shutdown but in my .profile I can't just do alias "sudo shutdown"="my command". Is there another way to alias multi-worded commands in Unix?
3
votes
1answer
364 views

How to pipe output of certain commands to a pager with zsh?

I am frequently working with subversion in console using its client svn. One of common tasks is viewing svn log; however its output is usually pretty massive despite of --limit option. I would like to ...
4
votes
2answers
950 views

Creating an alias containing bash history expansion

I often forget to run a command with sudo, so I find myself often typing sudo !! immediately afterwards. I tried aliasing this, but bash chokes on the !! part. Is there some way to represent this ...
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 ...
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?
7
votes
1answer
3k views

Why are Mac OS X alias files so large?

On Mac OS X, I have two aliases in my Applications folder, each points to another folder. They are 1 MB each. Why so large? I've found other sources on the Internet to say that yes, alias files can ...
3
votes
1answer
509 views

Sending email from domain name address

hey, I've just bought a domain name and would like to send emails from blah@mydomain.com. I can use an alias from my hotmail/gmail account, but the recipient sometimes sees it as "my@hotmail.com on ...
2
votes
1answer
2k views

How to set alias permanently using command?

Dear Folks I don't have access to home directory. So I can't access .bashrc or .profile file. So the only option (I guess) is using the command for setting alias. Is there any way to add alias ...
4
votes
3answers
470 views

How to tell bash not to expand aliases

I know there is a simple syntax for telling bash not to expand aliases. However, Google is not turning it up and I'm too lazy to read through man bash. Also, the answer should be on this website.
3
votes
2answers
1k views

How to undo alias, PATH=$PATH:./Test - (Unix)

1.) In a terminal when we make an alias for any command line,the life of that alias is as long as the terminal is open. alias new_command=old_command example: alias dog=cat But can we explicitly ...
2
votes
1answer
710 views

Overwrite ls in .bash_profile

I'm new to bash and unix. I'm trying to create an alias for ls. In my .bash_profile I have the following: alias ls="ls -lhHG" This doesn't work at all. If I change it to: alias la="ls -lhHG" ...
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 ...
1
vote
3answers
198 views

What is the return value of a complex alias in bash?

When I execute a command that has been alias to a series of commands, what value gets returned back to the shell? Also, assuming I have an alias defined like this: alias doit 'cd ~/some/dir; ...
2
votes
1answer
914 views

How does \cp work?

I know that if you have some alias with the name cp, you can bypass it using \cp. Is this unix syntax? Are there any other uses of this syntax?
1
vote
1answer
905 views

Create alias (desktop shortcut) of an application installed by Macports

I just installed Dia using macports. Now, I need to place the shortcut in the Apps folder and also make the executable available in the Spotlight search. How can I do that?
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 ...
3
votes
1answer
705 views

OS X: alias vs. symlink

What is the difference between an "alias" and a symlink on OS X?
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 ...
2
votes
1answer
203 views

Can I use the first page of a PDF document as its alias icon in OS X?

Is there a painless method for using the first page of a PDF as its alias icon in OS X? The operating system does this for PDF documents on the desktop, and I'd like to replicate the behavior for ...
1
vote
1answer
446 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
2answers
3k views

Setting a path alias for mysql on Ubuntu, with the XAMPP package

I've installed XAMPP, and now want to set an alias so that I can open the commandline mysql client with just a single command. Right now I have to type /opt/lampp/bin/mysql -u root -p every time. So ...
0
votes
1answer
465 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?
4
votes
1answer
4k views

Stop sending mail to myself when choosing Reply All in Outlook

My company has set up each mail account with serveral aliases. My default account is firstL@mycompany.com. I also have: first.last@mycompany.com flast@mycompany.com first_last@mycompany.com The ...
8
votes
1answer
12k views

How to alias a hostname on Mac OSX

In a nutshell, I would like to be able to open a browser and open local.example.com but it actually loads http://localhost/path/to/example.com/ I am using Mac OSX 10.5, and not afraid to get my hands ...
14
votes
9answers
10k 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
2answers
735 views

MSYS: alias resets upon restarting MSYS console

Every time I reopen the MSYS console (not cmd.exe) I find that the aliases that I have added to the shell are cleared. How can I save my aliases so that I do not to reenter them on every use? For ...
4
votes
3answers
4k views

How to alias a hostname?

Is it possible to keep a network alias - without specifying the IP address in the hosts file? For instance, I have abcd.efgh.com but want abcd -> abcd.efgh.com so that ping and ssh work as they ...
2
votes
3answers
3k views

Quick Mac OS X shut-down icon

How would I create an icon on my Mac OS X desktop, to do a "shut down"? (With... or without... the "are you sure" verification.)
2
votes
1answer
560 views

In Powershell on Windows7, how do I automatically set aliases (or run scripts) when powershell loads?

I have created a powershell cmdlet and assigned it to an Alias. How do I do this automatically every time powershell launches? (i.e. so I don't have to re-assign the alias every time)
5
votes
2answers
1k views

How to create shortcut command in Mac

I would like to a shortcut command in Mac as I frequently call commands that are a bit long in Terminal. How can I do that?
4
votes
3answers
3k views

Can I change the “From” name and address without going into Mail.app's preferences?

Can I somehow add an editable "From" field to Mail.app, a bit like Virtual Identity for Thunderbird, just like I could change the "Reply To" address on the fly? In Mail.app, one can set up multiple ...
1
vote
4answers
2k views

Ubuntu - Create a link to a specified directory so I can easily change to that directory

Is it possible to create a symlink to a directory, like /var/lib/tomcat6/webapps/MyWar that I can access from everywhere? I want to be able to say cd myapp from anywhere in the directory tree and go ...
1
vote
1answer
170 views

Unix: Overloading Aliases

What happens if I have this in my bashrc: alias ls="ls -l" alias ls="ls -a" when I type ls they will both match. Is the last one kept or both?
0
votes
1answer
497 views

Linux Bash alias: Why does it says -xvzf not found

I have used mkalias suggested here http://superuser.com/questions/114546/how-to-store-a-unix-alias by typing mkalias untar "tar -xvzf" but it says -xvzf not found Why ?
1
vote
2answers
494 views

Why does an alias work in the Terminal, but not when called from a script?

I've added the following to my ~/.bash_profile # opens "flashlog.txt" in Console alias trace='open -a /Applications/Utilities/Console.app/ ~/Library/Preferences/Macromedia/Flash\ ...
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 ...
33
votes
4answers
11k views

Bash: Spaces in alias name

I am trying to create an aliases in bash. What I want to do is map ls -la to ls -la | more In my .bashrc file this is what I attempted: alias 'ls -la'='ls -la | more' However it does not work ...
3
votes
1answer
2k views

In Ubuntu, routes are not added as defined in rc.local file…why?

I need to setup my ubuntu pc single nic card ip as 192.168.1.6 for internet and 10.172.170.95 and 135.10.86.100 for my lan and for another network through my 4port DSL modem.So i defined like this. ...
5
votes
1answer
1k views

What does “network” mean in the /etc/network/interfaces file?

In Linux, to define aliases, we have to modify /etc/network/interfaces.. Something like this: auto eth0:1 iface eth0:1 inet static address 192.168.1.60 netmask 255.255.255.0 network x.x.x.x ...
2
votes
1answer
247 views

On Solaris, can I alias one command to multiple possible locations?

Let's say I have a script called bob. It might be in two locations: /usr/local/bin/bob or /usr/local/bin/scripts/bob. Is there a way I can alias bob to both locations and it will stop whenever it ...
1
vote
1answer
69 views

What's the best way of telling Kaffeine to play in random order the 15 newest files in a directory in linux?

I want to be able to use kaffeine or another media player to randomly play an arbitrary number of the newest files in a particular directory. Preferably with as little typing as possible, and I am ...
11
votes
1answer
2k views

Vim Ignores Aliases

If I map a command in vim using something like map <f4> :! pdflatex %<cr> Vim will ignore my alias for pdflatex (something like alias pdflatex='pdflatex --temp-dir=something'). Is it ...
3
votes
5answers
2k views

error when using commandline as a bash alias on linux

I want to save the following commandline sequence as a bash alias: grep `date '+%d/%b/%Y'` access.logs | egrep 2765330645ae47d292c9ceac725d744e.py |awk '{print $1, $4, $5, $7, $8, $9, $10}' | sort ...
1
vote
2answers
23k 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 ...