Questions tagged [alias]
In computing, an alias is an alternate name for an object, such as a variable, file or device.
351
questions
1
vote
1
answer
2k
views
How to place a folder into a variable location (~/Library/Application Support) and then make an alias to that folder quickly?
Would it be at all possible to do the following:
Place an entire folder within the ~/Library/Application Support folder on a Mac.
Make an alias on the desktop to a link inside that folder.
I'm ...
2
votes
2
answers
232
views
How enter in folder with one command?
I work a lot in two folders:
/home/valter/Dropbox/Development/git/valter
/home/valter/Dropbox/Development/git/company
I would like to create command like:
$valter
and enter in /home/valter/...
0
votes
2
answers
2k
views
Setting an alias only for current user in Unix
I want to create a Unix alias, that allows me for example to type l for ls -l.
Nevertheless, I do not want to modify the file /etc/bash.bashrc as that one applies to all users I believe.
How can I ...
4
votes
3
answers
5k
views
Where are aliases set in CentOS?
There is a typo which causes an error message upon logon (someone typed lias instead of alias). I have checked /etc/bashrc as well as ~/.bashrc and /etc/profile as well as ~/.bash_profile for ...
0
votes
2
answers
364
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 ...
1
vote
2
answers
3k
views
Error in url alias in lighttpd
I have this configuration:
alias.url = (
"/acruz/" => "/var/www/localhost/htdocs/acruz/",
"/jvangemeren/" => "/var/www/localhost/htdocs/jvangemeren",
"/doceno/" => "/...
0
votes
1
answer
70
views
Multiple drupal installations on apache work with their own DNS entries but not with Alias
So my localhost server has never had a problem because I've never been developing with other people on multiple websites.
Now, however, accessing a secondary site via an Alias is running into a ...
1
vote
0
answers
2k
views
PHP does not work on alias (XAMPP)
I trying to make alias on my local machine with XAMPP for my PHP project.
I added follow in httpd.conf:
Include "conf/alias/*"
And make two files for aliases, one of them is like:
Alias /aiuu "d:/...
3
votes
1
answer
925
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 ...
7
votes
1
answer
548
views
I deleted my aliases file, but my aliases are still in my bash session - how can I recover them?
I had a ton of aliases defined and I use them all the time. I have a terminal session open now in which all the aliases are valid and working. However, the .bash_aliases file in which they were ...
0
votes
1
answer
252
views
Gnome terminal new tab behavior
I have an alias for cd command that does some additional logic before running actual cd (if you want the details, it activates virtualenv if it finds it in the directory). But when I open a new tab, ...
6
votes
2
answers
899
views
Aliases with numerical names
I just installed Oh My ZSH on my Mac. Everything is working great, except I can't define aliases with numerical names.
If I execute
alias 5="cd ~/Projects/Projectname/"
5
I get the following error ...
2
votes
1
answer
191
views
Trying to create bash function which collects and quotes all arguments, but it doesn't work if args contain brackets or single quotes
I saw the following shortcut for "git commit" suggested somewhere:
function gc {
git commit -m "$*"
}
This is supposed to allow you to write the commit message inline in the shell, without quotes ...
0
votes
2
answers
111
views
How can I automate my usage of three VM machines with the same alias?
How do I automate my usage of three VM machines which require me to add a IP aliased to a name in my HOSTS file. I upload code to the server of choice and then I go to the address http:/ / serverVM/...
0
votes
1
answer
118
views
how to edit aliases
I just started looking into aliases and I already created a couple aliases before reading how to write alias commands into files so you can easily edit them. If you just directly run the command ...
5
votes
1
answer
2k
views
Alias defined in .bashrc not working after pipe
I'm stuck with the following problem.
I've defined an alias in .bashrc (and .bash_profile):
alias echo2="echo"
This works well:
$ echo2 "test"
test
However, if I try to use it after a redirect, ...
5
votes
3
answers
2k
views
Do aliases slow down a shell's start?
Sometimes my shell (zsh) takes longer to start than usual (I open the terminal, and it hangs a bit until I can input commands).
I have a few aliases on my .zshrc (well, actually they're in a ...
1
vote
2
answers
751
views
Can I have two different users in Windows XP to use the same local profile (user alias)
I need to have two different userIds that map to the same local profile. What I really need is to have to users that are the same one.
Is this possible?
Thanks!
1
vote
2
answers
290
views
Changing the program name displaying on Konsole, using an alias
I have an alias for irssi:alias irssi="screen irssi. When I am running irssi in Konsole, the tab name shows up as "screen". Is there a way to make it display as "irssi"? My tab format on Konsole is: %...
1
vote
1
answer
206
views
Alias a protocol to a url
I currently work in an organisation which is mostly Windows users but there are some including myself using Linux here.
We have a shared storage drive which we use for sharing files between us and I ...
3
votes
3
answers
526
views
How do I make a bash alias that outputs file names in a format I can pipe to vim?
When rebasing with git, I'm interested to open the files that have merge conflicts.
I can do this with:
vi `git diff --name-status --diff-filter=U | awk '{print $2}'`
but if I alias that:
alias ...
4
votes
2
answers
2k
views
OS X: is there an application that can check for broken aliases in Finder? [closed]
I use a lot of aliases in my file system. Many original documents are placed in global repositories and I access them by aliases grouped in "tag" folders. Therefore, when I need to delete such a ...
0
votes
1
answer
1k
views
mac finder - how to open alias in a new finder window
I am doing a video project in which I created a folder with a bunch of aliases to files on various spots on my hard drive, so that I could have references to those files all stored in one location but ...
6
votes
1
answer
2k
views
How to create alias for - minus sign
I want to map the - to cd -
I've tried escaping it, w/ and w/o single/double quotes but neither of them seems to work.
alias \-='cd -' or alias '-'='cd -'
=>
bash: alias: -=: invalid option
alias:...
0
votes
2
answers
455
views
System-level bash/zsh alias blacklist
Is there a blacklist feature/functionality in bash/zsh to prevent specified commands and such from being overridden with an alias?
Specifically - is there something that can be set system-level in a ...
0
votes
2
answers
89
views
Disabling sudo halt
It's happened to me a few times now, that I want to shut down my own computer, grab the next best terminal (always have two dozen of them floating around), and type sudo halt, only to realize I've ...
3
votes
1
answer
3k
views
how to put my arguments into a Bash alias command?
i usually have the following simple alias in my bashrc:
alias g="grep --color=always --exclude-dir=\*.svn\*"
but now i have to work on systems that only have GNU grep 2.5, hence no --exclude-dir ...
0
votes
1
answer
119
views
Ubuntu 10.04 Windows2003 adding a route for GPO assignment
I want the PC's that receive IP from my Ubuntu DHCP3-server to be able to retrieve the GPOs that are on my windows 2003 server.
I'm using virtualbox and 3 virtual machines:
1 windows 2003 server 192....
0
votes
2
answers
3k
views
Linux dynamic alias
I am very new to Linux. I just found the alias command which is very useful as I quite often have to dig through log files
So I need to regularly open text files
they are generally stored in the ...
1
vote
2
answers
1k
views
Linux: How to automatically detect display and set up default editor accordingly
I am relatively new to linux. I am connecting to a remote linux machine sometimes via telnet and sometimes via NX client for windows. When I connect via telent I would like the default editor to be ...
3
votes
1
answer
13k
views
How to create an alias in Apache 2 that points to a network share?
I am trying to create an Alias directive with Apache 2.2, to point to a shared folder on other computer.
Apache is running on machine M1 at IP 192.168.0.103, the other machine M2, with the shared ...
1
vote
1
answer
100
views
How do I set an alias for a search command that takes two arguments
I have a shell command which find files that contain 2 strings together:
$ grep -rl JFL . 2>/de/null | while read n; do grep -l 20120907 "$n"; done
The strings above are JFL and 20120907
Now I ...
2
votes
1
answer
4k
views
ifconfig ignores alias on IPv6
When I add an IPv4 address for the interface eth0:0 with ifconfig, it is created correctly:
ifconfig eth0:0 add 192.168.10.10
This can be verified by ifconfig or "ip a".
When I add an IPv6 address ...
1
vote
2
answers
5k
views
How can I set outlook web app to send from/send as an email alias? [closed]
I have an email account I access through the outlook web app and I have an email forwarder. I want to be able to send messages appearing as from the email forwarder. How can I set this up?
18
votes
1
answer
11k
views
overriding user defined functions with the same name as system commands
This function exists in one of my users' ~/.bashrc:
function rm()
{
ls $*
echo "rm?"
read ans
if [ "$ans" == 'y' ]; then
/bin/rm $*
fi
}
In my ...
0
votes
2
answers
321
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 ...
0
votes
3
answers
3k
views
How to make bash aliases available as linux commands?
I have many bash aliases on a remote location.
But when I try to run those from my local linux box,
I get the 'command not found' error. e.g.
$ ssh root@remote 'status'
bash: status: command not ...
2
votes
3
answers
465
views
In Power SHell set alias cp to cp -v
I have cp for power shell. But I want to use cp in verbose mode without writing -v. So cp should be aliased to "cp -v" command. How to alias cp to "cp -v" in power shell?
10
votes
4
answers
7k
views
How can I create an alias for apt-get?
I remember that on one Debian system, I used apt install package to install a package. It asked for a password afterwards and was more convenient than sudo apt-get install.
Now I am not sure how I ...
0
votes
1
answer
252
views
alias: extract options from command
Apologies for the bad title. I couldn't come up with a better one.
I want to alias a command to another command, and extract options from the text of the command itself. I realize this is unclear, ...
3
votes
1
answer
307
views
How can aliases of a folder be found using cmd?
Is it possible to find the aliases that correspond to a certain folder (and perhaps its sub-directories, too) using Windows cmd? I've tried searching, but it gives me results related to creating ...
0
votes
1
answer
410
views
How to get alias working on server that is connected via ssh?
I connect to another server using command:
ssh -Y server1
On server1 I add an alias in .bashrc file:
alias gousr='cd /opt/user/myuser'
When I try to run gousr command at server1 xterm, it says "...
27
votes
1
answer
33k
views
Can I "export" an alias to the SHELL that invoked a script?
I'm trying to write a utility script that defines certain aliases.
My SHELL is tcsh (can't change that).
I tried the following
#!/bin/tcsh
alias log 'less ~/logs/log.`date '+%Y%m%d'`''
Then I run ...
2
votes
2
answers
532
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...
-...
24
votes
9
answers
67k
views
why alias names defined in .bashrc file are not working?
I have give alias names in .bashrc file like below. But the alias names are not working. why?
alias c='clear'
alias l='ls -lt'
alias h='history'
alias d='ls -lt |grep "^d"'
export ORACLE_HOME=/...
8
votes
3
answers
2k
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. I'...
6
votes
1
answer
5k
views
Is there a aliases file for sSMTP?
I installed sSMTP for sending emails from command line.
I want to create some alias for cron jobs:
$ sudo vim /etc/aliases
# append this line at the end
myname: root
$ newaliases
newaliases:...
0
votes
1
answer
38
views
Sharing remote folder in subdir
I want to use a remote shared folder use in a subdirectory.
For example the share \somePC\folder => x:\folder\somePCsRemoteFolder
is there an easy way to do this ?
endo
0
votes
1
answer
1k
views
create alias to ssh to a server and then connect to mysql
I currently have an alias to connect to a remote server:
alias server='ssh [email protected]'
I would like to have an alias to connect to this server, and then ...
1
vote
2
answers
12k
views
How to alias an IP address to make DLNA resource accessible from different IP network
what I have
I have a home wifi network 192.168.1.0/24 having DLNA resource 192.168.1.100.
I have a TV with ethernet and a netbook with both wifi and ethernet interfaces.
I want to make my notebook ...