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
1answer
402 views

ssh: add “-X” to default options

How do I add "-X" into my ssh default option? i.e., when I type ssh A.B.C.D, it should really do ssh -X A.B.C.D I can alias it, but is there a more "elegant" solution to do that in .ssh/config file? ...
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 ...
2
votes
8answers
724 views

Command to search programs in Linux

Do you have any easy idea to define some alias in .bashrc for finding some command that you want to search (when you forgot its name) in your machine, visiting all "bin" directories, maybe using ...
1
vote
1answer
137 views

Accessing your bash profile and history anywhere - via the internet

I'm curious if anyone has tried to tackle the task of having non-sensitive parts of their bash (or other shell) profile made available anywhere they go. I worked for a company for a time that did ...
0
votes
1answer
210 views

How to pass arguments to an alias?

I'd like to set up an alias push, which would translate into git push origin ARG1:ARG1. For instance, from the command line, i'd like to push A B and get that translated to git push origin A:B How ...
1
vote
1answer
2k views

Some CSS not working correctly when using an alias to enter website

I have built an intranet for my company, but when I access the site using an alias (DrewNett) so of the styling in IE is incorrect. It's only in IE, and the source is exactly the same and when I go do ...
2
votes
1answer
527 views

Bash alias history substitution similar to \!* in csh

My question is very similar to that of this old post. I would like to do something similar: place in an alias the last argument(s) typed on the current command line. This would be equivalent to the ...
2
votes
1answer
127 views

Create an alias - in Bash?

How can I create an alias named - in Bash? None of the following works: alias -='cd -' alias \-='cd -' alias '-'='cd -' with error: bash: alias: -=: invalid option alias: usage: alias [-p] ...
0
votes
1answer
55 views

How can I check whether Vim has the -p (tabs) option or not?

I would like to figure out in my .bashrc (or one of the files it sources) whether Vim has the -p option available and if so create an alias. Now, that same .bashrc is used on numerous systems ...
0
votes
2answers
1k views

What is the correct way to alias applications in OS X through bash?

In my ~/.bashrc, I have several aliases like: alias emacs='/Applications/Aquamacs.app/Contents/MacOS/Aquamacs' alias octave='/Applications/Octave.app/Contents/Resources/bin/octave' alias ...
0
votes
2answers
157 views

command line alias versus .bash_profile alias

when I create this alias from the command line everything works fine alias ejecta='for I in 1 2 3; do /usr/sbin/diskutil unmountDisk disk$I;done' When the same alias is created in .bash_profile. the ...
1
vote
2answers
891 views

get value of an alias in bash

I recently switched from tcsh to bash, and I'm used to being able to do things like sudo `alias netstat` but since alias gives name=value in bash, I can't do this anymore. Is there an equivalent in ...
1
vote
0answers
277 views

Create a virtual directory without IIS

My projectgroup is working on a project that has an upload dir. We ofcourse exclude the upload dir from our SVN. This means that we don't share these files. We do share the DB since it's stored on the ...
3
votes
1answer
463 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
186 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
231 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 ...
1
vote
1answer
936 views

sh alias: command not found

I have written a very simple script like this: function apply_to_dev { echo "Applying scripts to DEV..." alias ISQL="isql -Uuser -Ppwd -SDEV -DDATA -I ~/bin/interfaces" shopt -s nullglob ...
2
votes
1answer
456 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
704 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 ...
2
votes
2answers
85 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
372 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
4answers
14k views

How do I create a symbolic link in Mac OSX?

I have a .sh file that I need to create a symbolic link. I would like to be able to access the file using the Terminal. The command I use is: ln -s /path/roo.sh /usr/bin/roo But when I type roo, ...
2
votes
1answer
429 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 ...
0
votes
2answers
134 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?
2
votes
1answer
631 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 ...
3
votes
1answer
1k 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
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 ...
0
votes
2answers
679 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, ...
2
votes
1answer
498 views

How do I create a PowerShell alias (or function) that contains an option?

I'm learning PowerShell, so I'm doing stuff like this a lot: Get-Command | Out-String -Stream | ss child (ss is an alias for select-string). I'm getting tired of typing Out-string -Stream all the ...
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 ...
1
vote
1answer
351 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 ...
0
votes
2answers
562 views

make an alias to move files to a tmp directory

I am trying to create an alias to move files and directories to the tmp directory. This is what I've tried: alias rm='/bin/mv *.* /tmp' The problem is that when I type rm filename, I get an error ...
5
votes
2answers
2k views

Console 2 command aliases

I use Console 2 and I would like to create some aliases for commands I use often. Maybe my google-fu just sucks today but I cannot figure out how to do this. Any help would be appreciated thanks.
2
votes
2answers
2k views

How to change default vi alias in Fedora 14?

In my laptop, if I type below $ which vi alias vi='vim' /usr/bin/vim Now I want to change the vi alias to another bin, e.g. vim_wrapper a script created in /usr/bin/, I type this line: alias ...
2
votes
5answers
2k views

bash alias for “cd directory; ls”

How do I create BASH alias for: I type in cdd directory and what that does is cd directory and then ls?
1
vote
3answers
399 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 ...
1
vote
1answer
743 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
1answer
1k 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 ...
5
votes
1answer
3k 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
0answers
577 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
653 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 ...
2
votes
2answers
405 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 ...
1
vote
1answer
468 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
1answer
706 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
427 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 ...
31
votes
2answers
5k 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