1
vote
1answer
26 views

Echoing aliases to .bashrc

I want to echo an alias straight into my .bashrc file. Here is what I am using: echo alias cdear='cd | clear' >> .bashrc However, the new line in .bashrc does not contain the quote marks. I ...
0
votes
0answers
18 views

goto inside alias is working only in one way

Why this is not working? #!/bin/csh goto skip_background run_in_background2: echo inside background goto back_from_backgroung skip_background: echo skipped alias run_in_backgroundx 'echo aliass \ ...
1
vote
2answers
36 views

Remote login in, creating alias, need advice

I usually remote login to the server at my school. I have a user name and password. The command is 'ssh -l username -p port machineName'. (username is mine, port is a number and machineName is the ...
0
votes
1answer
62 views

nested aliases in /etc/aliases: which order?

my /etc/aliases (ubuntu 12.04 lts) already contains some aliases redirecting to root: postmaster: root clamav: root monit: root now I want to add another alias that redirects all root messages to ...
1
vote
2answers
58 views

Alias for directory using a symbol

I'm looking to set up an alias for my work directory, which can change as I change context, and I was trying to find something that was short enough to stand in as a replacement for ~. I'd be tickled ...
0
votes
1answer
91 views

How to add network aliases in Linux for network computers

In Windows, the c:\windows\system32\drivers\etc\hosts file lets you add aliases to IPs so you can remember those computers with a familiar name. Here's the header of the HOSTS file, for example ...
0
votes
3answers
120 views

Create alias or add path?

I've just installed a new program (let's call it foo) on my Linux machine. The program's files are in an unusual location that is not currently part of my $PATH. If I would like to be able to easily ...
0
votes
2answers
91 views

Use the result of 'whoami' as part of an alias

I am setting up my default .bashrc on my Ubuntu machine that I will soon be adding more and more users to. One command that users will have access to is mysql, logging them into the SQL system on the ...
-1
votes
1answer
80 views

How to copy from couple folders back to the current directory?

I just came to an interesting question in Linux. I want to find a shortcut for copying from multiple folder back in the path to the current path. For example: A/B/C/D/E> cp ../../../example.txt . ...
1
vote
2answers
133 views

How do I make an alias work when I need to invoke more than one binary in the same command?

Say I have two binary files: binary1 and binary2. Each of them has its own option set: options1 and options2. Users need to invoke a command that follows this structure: binary1 options1 binary2 ...
0
votes
1answer
57 views

Save Linux aliases for later usage

After repeating an Arch Linux installation for several times I started to wonder whether I could make things easier for me in the future by taking some general commands that I am bound to use again ...
3
votes
2answers
67 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 ...
0
votes
1answer
51 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 ...
2
votes
1answer
156 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 ...
0
votes
1answer
117 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, ...
1
vote
2answers
111 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: ...
0
votes
2answers
333 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
2answers
394 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 ...
1
vote
1answer
54 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 ...
0
votes
2answers
95 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
3answers
778 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 ...
0
votes
1answer
116 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 ...
1
vote
0answers
255 views

Dovecot/Postfix-mysql e-mail Aliases are not correctly forwarded

I recently set up Dovecot/postfix-mysql on my Debian Squeeze Server and I have a bit of a problem. When ever I send a email to an alias (foobar@mydomain.com forwarded to foobar@gmail.com for example) ...
0
votes
1answer
404 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
0answers
322 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
298 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 ...
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? ...
2
votes
8answers
723 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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
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?
8
votes
5answers
5k 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 ...
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 ...
0
votes
2answers
2k 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 ...
0
votes
1answer
482 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 ?
3
votes
1answer
1k 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 ...
1
vote
1answer
68 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 ...
3
votes
5answers
1k 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 ...