The alias tag has no wiki summary.
0
votes
1answer
15 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
...
0
votes
1answer
14 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
1answer
38 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 user@ec2-00-00-00-000.compute-1.amazonaws.com'
I would like to have an alias to connect to this server, and then ...
0
votes
2answers
121 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 ...
0
votes
3answers
43 views
How to make an alias for a folder on a mounted drive?
I use parallels to run a windows machine and would love to make an alias in my .profile to make a shortcut to my project folder, but the following alias below dosn't seem to work.
alias ...
0
votes
1answer
66 views
Creating IP aliases upon server reboot
I have a server running RHEL 6, and have created multiple IP aliases on it. However, when I restart the server, the IP aliases are gone.
I tried to edit the /etc/rc.d/rc.local file to include
...
0
votes
1answer
37 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
66 views
How to set an alias which will automatically ssh to another server
I often use this command to connect to another server with x forwarding:
[myuser@server1]$: ssh -Y 10.32.45.123 (10.32.45.123 is server2)
myuser@10.32.45.123's password:
[$myuser@server2]:$
I ...
0
votes
2answers
51 views
Alias for recursive case insensitive search in current directory
How do I set an alias, such as "mysearch", which will search for a string recursively in the directory I'm standing in. It should be as below:
mysearch "this table..."
=
find -type f -exec grep ...
0
votes
1answer
44 views
In MacOS X is there a way to create a shortcut to a folder on a readonly drive?
I have a partitioned drive with a different OS on my Mac. I can access this drive in readonly mode, but not write mode.
There is a folder on this partition drive that I often open, and therefore I ...
0
votes
1answer
51 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
0answers
355 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
7answers
156 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
50 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
42 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
118 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 ...
1
vote
1answer
92 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
55 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
25 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
97 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
71 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
152 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
179 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 ...
2
votes
1answer
65 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
60 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
91 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
384 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
...
1
vote
1answer
38 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 ...
1
vote
1answer
70 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 ...
1
vote
2answers
49 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
82 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 ...
0
votes
1answer
943 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 [ ...
0
votes
4answers
329 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, it ...
2
votes
1answer
120 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
66 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
189 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
...
1
vote
1answer
120 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 ...
1
vote
2answers
231 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
161 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
375 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, ...
1
vote
1answer
152 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
368 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 ...
0
votes
1answer
103 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
1answer
86 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 ...
2
votes
1answer
348 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.
1
vote
1answer
497 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 ...
1
vote
4answers
547 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
102 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 ...
2
votes
2answers
203 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 ...
0
votes
1answer
257 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 ...