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

learn more… | top users | synonyms (1)

4
votes
1answer
575 views

How to make bash alias invocation conditional on PWD?

I currently have this alias: alias cmakerel='cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev ../../ && make -j4' Essentially, it will call cmake to do an out-of-source build from PWD. It works ...
0
votes
2answers
247 views

What is a simple standard command line way of getting 'ls' to produce file permission in octal?

Any know a standard way, other than 'stat' to produce octal output for file permission from 'ls'? Standard way of using stat (on OSX) is: stat -f '%A %a %N' * where * can be any file pattern that ...
3
votes
2answers
249 views

Aren't egrep, fgrep supposed to be aliases to grep?

Since egrep is essentially grep -E I would expect it to be an alias that calls grep with that option. However on my system file `which egrep` shows it is an executable. Also egrep as an alias only ...
3
votes
1answer
586 views

Define custom aliases for outlook contacts

I have a close coworker whom I email almost daily. Let's call her "Leigh Wilson". The global address book at my company has several other people with the first name "Leigh" and/or the last name ...
2
votes
1answer
737 views

trouble aliasing cd in bash

I'm adding a couple of aliases to my .bashrc file for some shortcuts I use often, among which are: alias .="cd /;ls" alias ..="cd ../;ls" alias cd="cd $1;ls" alias ls="clear;pwd;ls" The effective ...
4
votes
2answers
2k views

Aliases in subshell / child process

I set up aliases in /etc/profile.d/alias.sh for each login shell. But if I run script.sh, I can't use that alias. How can I set alias even for subshells or child processes ? /etc/profile.d/alias.sh ...
2
votes
2answers
87 views

Is there a way to tell the shell (zsh preferably) about a command?

I defined an alias: alias school="cd ~/School/3BaFys/" to quickly go to the folder 3BaFys which contains all of the directories I need this year. Is there a way to tell zsh that when I do: ...
2
votes
5answers
423 views

Multiple-command alias enters bash shell but fails to navigate to path

I have this alias defined to run bash then navigate to a certain folder but when I run it, it only runs bash and stays in the current path/directory/folder. I've defined them in two different ways in ...
1
vote
1answer
5k views

How to Create a Permanent Alias in Mac OS X Lion Terminal?

I've googled the heck out of this. The typical methods of adding the alias to ~/.bashrc or ~/.bash_profile just aren't working for me. Help please? Thanks! Here's my current ~/.bash_profile if [ ...
3
votes
1answer
512 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
486 views

How to expand aliases on any invocation of /bin/bash

Any of you know a way to expand an alias whenever a new shell is invoked (from any place)? For example, my alias is: alias ls='ls -F' Now if I invoke it in grep -l ramesh | xargs ls … here I ...
3
votes
1answer
2k views

.bashrc loading aliases from different file

I have a .bashrc file, which I want to setup so it reads aliases from an .aliases file and sets them up. Currently I have: # User specific aliases and functions while read alias_line do echo ...
2
votes
1answer
680 views

How to make alias shortcuts for terminal work as root or as exec?

Let's say I have an alias like this: alias findip='wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'' the output would look like this: matthew@ubuntu:~$ findip ...
0
votes
2answers
137 views

On mac, how to copy a networked folder from a Windows machine?

I can see the (XP) shared folder on my Mac (10.6.8). If I try and drag/drop the folder in finder, I get an alias to it. How do I copy the folder itself?
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 ...
0
votes
2answers
807 views

OSX: Automagically creating a list of the files/folders on external hard drives, to see what's on them when they're disconnected

I want to be able to see a list of the files and folders on my external hard drives, without having to plug them in first. A program that scans external drives when they're plugged in and keeps a ...
1
vote
1answer
1k views

Hostname Aliases in XP Pro

In XP Pro how can I create a local alias for hostnames of some other computers on the domain? When I created an entry in any of hosts, lmhosts, or lmhosts.sam, I can ping a computer with the alias, ...
4
votes
2answers
1k views

Create an alias to a samba share from the command line

I'm currently wanting to deploy a setup to around 300 Macs. I have all of it scripted and ready to deploy, excepting that I'm having trouble creating a working alias to a samba share from the command ...
5
votes
1answer
4k views

Git log alias - fatal: ambiguous argument '%ad': unknown revision or path

I'm trying to use Git Immersion's log alias: [alias] hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short but Git responds with fatal: ambiguous argument '%ad': unknown ...
1
vote
1answer
416 views

Setting alias in Windows PowerShell

In PowerShell, I type: PS C:> sal cdp "cd 'C:\Users\ec\Documents\Visual Studio 2010\Projects'" I get no error from this, and PS C:> gal cdp shows definition as: cd 'C:\Users\ec\Documents\Visual ...
1
vote
3answers
478 views

On a Mac, how can I group together commands I want run into a alias?

In my .bash_profile I have created alias to commands that I run often. What if I want to group together multiple commands together, and they should run in serial one after the other. How would I do ...
6
votes
2answers
1k views

Silencing bash's unalias when there's nothing to unalias

I have access to a couple of remote accounts, which I mount via sshfs in subdirs of $HOME/SSHFS. In order to remind me that I'm not working with local files, I have set $PROMPT_COMMAND to a function ...
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 ...
1
vote
1answer
859 views

csh cd alias: how to eliminate error when no parameter is supplied

I am familiar with bash, but my works require csh. in my .cshrc, I created this alias: alias cd 'cd \!:1; ls -l' It works very well except for one case: when I cd without any parameter: cd In ...
1
vote
0answers
623 views

Running Windows XP Command Line from CMD.exe does not load autorun processor batch file

I have a batch file set to load up when the Windows XP command line (cmd.exe) starts (using the registry key Command Processor as detailed). Unexpectedly, the batch file only runs under certain ...
0
votes
2answers
707 views

MacVim behaving strangely with my aliases (even setting shell=/bin/bash\ -l)

I wanted to write some scripts and have MacVim call some bash commands. I have some aliases and wanted vim to be able to call them, so I knew I needed a login shell, just didn't know how to make vim ...
1
vote
1answer
503 views

Mac alias/symbolic link question

If I create a symbolic link or alias pointing to $HOME/Desktop and place it in a .dmg disk image, then distribute the dmg, will the link still point to the Desktop for the end user?
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
455 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
345 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
352 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
369 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
955 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 ...
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 ...
3
votes
2answers
2k 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
717 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
200 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
926 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?
3
votes
1answer
709 views

OS X: alias vs. symlink

What is the difference between an "alias" and a symlink on OS X?
2
votes
1answer
204 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 ...
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 ...
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 ...
2
votes
1answer
563 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)
1
vote
1answer
171 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
500 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
497 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
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. ...
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 ...