Ubuntu :: How To Permanently Alias Command

Mar 6, 2010

My current alias'd commands are:

alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias ls='ls --color=auto'

I'd like to change 'ls' and add a few more, is there a command to permanently do that, or a config file I need to edit somewhere?

View 2 Replies


ADVERTISEMENT

General :: How To Alias A Command For Sudo

Sep 25, 2010

I have an alias that I would like to use both as a regular user and as root, via sudo. Specifically, it is this:

alias rm=trash This works fine as a normal user, and it works fine when I use sudo -i to get a root shell prompt, but if I use sudo rm, the alias does not apply. So where do I need to put my alias so that it works in one-off sudo commands?

View 1 Replies View Related

General :: Used Alias Command For Ll And Now Ll Is Not Recognized?

Dec 3, 2010

I used the alias command to make ll be ll -lrt. I have linux 5 and using the bash shell. now I can't even use ll, only ls. when I go into the bin directory, ll is not in the list and the normal color codes for bash are not showing either...folders blue, etc

View 4 Replies View Related

Ubuntu :: Bashrc Ls Alias Not Working Same As Command Line

Oct 25, 2010

I have a few alias' in my .bashrc to save some typing, mostly ls type variants.

I wanted to add the following:
- give me a Long listing of ALL in Reverse Time order, (don't recurse directory)

Code:

But it doesn't work anything like the way it does on the command line

When I use the alias I get the following:

Code:

No Time, No Permissions, no group/owner ... , Why?

View 2 Replies View Related

General :: Setup An Alias Or Shortcut To Do The *nix Find Command?

Apr 5, 2011

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 easier. I would like to do something like: mysearch query ("*php") (.) It would be great if the command could accept three arguments, in reverse order:

query string, file name expression, directory If the second two arguments were omitted they would default to not being included, and the current directory. Finally, the icing on the cake would be that if additional variables were included (4th, 5th, 6th...) they would be injected as additional arguments for the find command (like I could say -type d) at the end. Attempted code I tried the example below, but I'm still having trouble setting default values. What am I doing wrong?

#!/bin/bash
c=${param1+.}
b=${param2+*}
a=${param3+test}
find $c -iname $b -exec grep -H $a {} ;

View 1 Replies View Related

General :: Using Shortcuts/alias Inside A Bash Command?

Jan 28, 2010

I know that using alias I can run a whole command with a shortcut. But my requirement is to use parts of a long command and in between I have to pass some user defined values.
E.g. Suppose I have to routinely copy a directory to another remote directory on a remote machine.The remote machine name is quite long as well as the directory path to which I want to copy the files into.So the command to do scp would look like this[URL]Now I want to do some sort of aliasing (say "ecp") so that I just need to pass the source_directory name and the ecp command and do my job

View 3 Replies View Related

General :: Alias A Device For The Mount Command In RedHat 9?

Aug 9, 2011

I have a program which mounts /dev/sdb1 for which I lack the source code. This device does not exist on my RedHat 9 system and I want to create /dev/sdb1 such that it's an alias for /dev/hdb1 Can I do this? with MAKEDEV?

I need to have an alias which will allow it to mount, not create a symbolic link to an already mounted directory. i.e. 'mount /dev/sdb1 /mnt/harddrive' should actually mount /dev/hdb1

View 7 Replies View Related

Fedora :: Adding LibX11 Permanently To Linker Command Line

Mar 15, 2011

I've been compiling a lot of games recently and most of them requires me to add libX11 to the linker command line. I can't think of nothing but to take a look at the Makefile and add -lX11. It works, but now, I'm compiling from a git repo, and I know the change will removed once I update the my working copy.To make it short, is it possible to add libX11 permanently to the linker command line?

View 7 Replies View Related

General :: Setup An "alias" Command For IDL?

Jan 25, 2011

I have installed IDL 7.1 on my Ubuntu 9.10. And now the instruction says that I should set up an "alias" for it.I do not know what to write in my "bashrc" as an alias for IDL.
These are the place of the executable command of IDL:

/IDL/idl-7.1/bin/idl
AND
/IDL/idl-7.1/bin/idlde

Note that "idl" and "idlde" are the executable files which run the program by typing them in Terminal. I would be very grateful if anyone could help me in how to write an "alias" for my IDL.

View 7 Replies View Related

Ubuntu :: Add A Local Domain Alias ?

Jun 28, 2010

Is there anyway we can add a local domain alias so that if we enter [url] in the browser it would point to [url]

In Windows XP I used to do it by editing the "hosts" file from the following directory

Code:

Code:

How do we do the same thing on Ubuntu 9.04?

View 2 Replies View Related

Ubuntu Servers :: Set Up An Alias Domain?

May 9, 2011

I set up a mailserver using this tutorial:[URL].. It works fine so far. I run this server for a small company with about 20 mailboxes where a address looks like that.[URL].. Now I want to set up an alias domain so that [URL].. also automatically is directed into the mailbox of "user".

View 1 Replies View Related

General :: How To Use The Alias

Aug 2, 2010

I am going through and old .cshrc file and it contains the following alias:

alias pwd 'echo $cwd'

I used to think that this is how pwd might have been implemented. But looks like thats not the case (because then this alias is meaningless).

View 2 Replies View Related

General :: How To Add New Alias

Feb 18, 2010

I was trying to add new alias "alias ls='ls --color=auto'" in .profile, but it never worked I displayed all the alias that are current available and did not see the one I just added and found this among them:

lsls $LS_OPTIONS
and the LS_OPTIONS is "-N --color=none -T 0"
this is in /etc/csh.cshrc file which I do not have permission to edit.
Is there way to overwrite it?

Also I do not see a .cshrc under my home directory. Can I just make one and source it? Or do I have to link it to some source file that already exists?

View 3 Replies View Related

Ubuntu :: Automate Or Make An Alias Of This Task?

Mar 8, 2010

I want an alias to move ~/.sportstracker to ~/Documents/Software/SportsTracker_4.1.1 and then zip it and name the zip file like this SportsTrackerBackup_yyyy-mm-dd (example: SportsTrackerBackup_2010-03-08)Note: I don't mind how the archive is compressed, 7z, rar, zip, tar, etc. Although the higher the compression the better

View 9 Replies View Related

Ubuntu :: Alias - SCP File From Folder To Network

Dec 17, 2010

I know this is a relatively simple problem but no matter what combination I try for my alias, I don't seem to be able to get it right! All I want to do is scp a file from my current folder to a location on the network:
Code:
scp filename username@computername:/folder1/folder2

This is the usual layout of the command that I use, so I thought that to save time, I would create an alias or even a function which did this for me, so all I had to type was
Code:
scp101 filename
and it would copy it to the set folder on the remote computer...

My attempt at an alias looks like:
Code:
alias scp101='scp !* username@computername:/folder1/folder2'
and I have also attempted a function:
Code:
scp101()
{
scp "$1" username@computername:/folder1/folder2
}

The alias tells me that filename is not a directory, which I assume means that I have some of the syntax wrong in the alias but I did a google search and I can't seem to find a decent example of what I'm trying to do. When I load up a terminal, I get an error message about the "(" of the scp101 function - so I've obviously can't get the syntax of that right either...

View 2 Replies View Related

Fedora Networking :: IP Alias On NIC ?

Feb 15, 2009

I have to move our DNS server to our VMware environment. With that comes a new IP address (10.10.102.x). The current address is in the 192.168.10.x. range. Is there a way to bind an alias to my NIC that has a different IP range? I tried it and it didnt work but if i used two IPs in the same subnet range it works. What are my options?

I don't want to go around and modify all my clients to use the new IP. I have many other things running like Nagios and Puppet. Unfortunately this is going to suck and I probably dont have any other options.

View 7 Replies View Related

Networking :: Alias Eth0 To Lan

Apr 8, 2010

I know I can rename my network interfaces (eg 'eth0' to 'lan', 'eth1' to 'net' etc) but does anyone know a way I can alias (symlink if you like) 'lan' -> 'eth0'

I want to be able to use more legible interface names in things like iptables rules (such as "-i lan" instead of "-i eth0") but I don't want to break any config that is expecting eth0 to exist....

View 5 Replies View Related

Networking :: Can't Reach The 2nd Alias 10.0.2.23?

Jan 12, 2010

I'm running ubuntu 9.04 and I have set up 2 ip aliases using the /etc/network/interfaces file http://pastie.org/775037 -- when I ping the main address 10.0.2.16, all works fine, same with the first alias 10.0.2.22 -- but I can't reach the 2nd alias 10.0.2.23 I get the following from ping:

PING 10.0.2.23 (10.0.2.23): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
92 bytes from 10.5.0.1: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 06eb 0 0000 3f 01 5e81 10.5.0.34 10.0.2.23

My machine's IP address is 10.5.0.34 I can't figure out why I can ping 10.0.2.22 but not 10.0.2.23 -- seems like there is probably some kind of routing thing that I'm missing, but I'm confused how it would have gotten set up for 10.0.2.22 but not 10.0.2.23 -- hopefully someone out there has an idea -- or can point me to references where I might be able to learn how to debug routing issues on a network?

View 5 Replies View Related

General :: Use A 'cdl' Alias That Would Cd Into The Directory?

Jan 2, 2010

I would like to use something like a 'cdl' alias that would cd into the directory i choose and then ls the contents automatically. I find myself using ls after i cd into a directory all the time. Something like:

alias='cdl=cd $1;ls'
usage: cdl /local/dir

View 2 Replies View Related

General :: How To Create Certain Alias

Apr 29, 2011

I'm testing out the aliases to have a better understanding on how to shorten commands. I am trying to list all files whose file names end with a .c extension in which starts from the current working directory and recursing through subdirectories as well. And I want to delay the path name expansion until the alias is executed. I want to use the directory /usr/share. Would the command be: alias findc='find -type d -exec /usr/share'?

View 3 Replies View Related

General :: Ll Not Working \ Have To Set Up A Alias?

Aug 5, 2010

i have to set up a alias like:alias ll='ls -l'them ll will work

View 2 Replies View Related

Ubuntu :: Adding Rename To An Alias To Remove Apostrophes?

Jan 9, 2010

The line I currently have is:

[code]alias fixname="rename 's/[(),]//g' * && rename 's/ /_/g' *"[code]

I can't figure out how to add in so that it removes apostrophes too.

View 3 Replies View Related

Ubuntu Servers :: Restarting Apache2 - Warning About Alias

Aug 10, 2010

I am getting following error messages when trying to re-start the apache2 on Ubuntu Server 10.04.
[warn] The Alias directive in /etc/squirrelmail/apache.conf at line 1 will probably never match because it overlaps an earlier Alias.
[warn] The Alias directive in /etc/phpldapadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
...waiting [warn] The Alias directive in /etc/squirrelmail/apache.conf at line 1 will probably never match because it overlaps an earlier Alias.
[warn] The Alias directive in /etc/phpldapadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[OK]

View 1 Replies View Related

Ubuntu Servers :: Apache2 Alias Doesn't Work

Nov 29, 2010

I'm trying to set up 2 aliases with PHP files in it. But in both cases I get a 403 Forbidden error. This is what the /etc/apache2/conf.d/alias file looks like:

[Code]....

View 9 Replies View Related

Ubuntu :: Anyway To Print On Screen In Terminal Window / What Alias Actually Does?

Jul 28, 2011

Is there anyway to print on screen in a terminal window what an alias actually does?For example, if I had an command that was an alias to open something in some directory, is there a way of finding out what the alias actually does?is there a way without looking in .bashrc / .bash_profile etc?

View 7 Replies View Related

Ubuntu :: Error: Line 29137: Bad Flag Alias Index: 0

May 9, 2010

I am getting the following errors continuously whenever I update/save a config file in /etc/

Code:

error: line 29136: bad flag vector alias
error: line 29137: bad flag alias index: 0

The config file got updated though. I am just worried that this may be something bad.I update the files using the command sudo gedit <config_file>. I haven't encountered this before in Karmic. Has anyone encountered the same error messages? This might be a problem with gedit. I tried doing the following and the error messages also came up:

1. In terminal, gedit foo.txt

2. In gedit, type anything and save

3. Terminal will show the following:

Code:

...
...
error: line 19234: bad flag vector alias

[code]....

Running artha from the terminal also causes the error.I've managed to get the top-most line of the error:

error: line 15: bad flag alias index: 0
error: line 15: bad flag vector alias

The hardest thing about this is I have no idea what's causing it. I thought it was gedit but running artha (from the terminal) also causes the error.Sigh. This is a clean install of Lucid, which again makes it even harder to know what causes it.

View 9 Replies View Related

Ubuntu Networking :: Create A Nickname/alias/logical Name For An Interface?

Jul 28, 2011

Basically I am looking for a simple way to create a universal nickname/alias for a interface.We ship servers that have upto 6 NICs on them. The user can have those NIC configured as either ethN, bondN or vlanN interfaces. As we need to provide NIC status information we would like to be able to run commands such as

Code:
ifconfig INTERFACE1
that would map to whatever the user had already configured.

View 1 Replies View Related

General :: .bashrc Ubuntu Eee Easy Peasy The Specifics Of An Alias?

Oct 21, 2010

I successfully edited the .bashrc file to get ruby version manager (rvm) working. Now I would like to turn that setting into an alias so that if i type the word 'ruby' into the terminal it not only goes to the rvm settup but also defaults to my webdev folder which is in my user home directory and also exicutes a command that will open up gedit ready to be used as the text editor for editing the .rb files. Can this be done i would settle for some added code for the 'if then' statement: so far it looks like this:

[Code]...

I don't want to mess with the default setup on this system too much and think things could get out of hand if i am not careful. So am cautious about doing anything at this stage. I wonder if it is possibel thought to setup that whole 'if then' statement as an 'alias'. I read a few referances to alias and looked in the manual like any good newby should but am needing your help please. getting out of the MSwindows mind set and into the linux logic is not so easy but is a great experience

View 13 Replies View Related

Fedora Networking :: OpenVPN Using Alias Rather Than IP

Nov 27, 2009

Is there anyway you can configure either OpenVPN client or the system to allow connections using OpenVPN to be made to computers on the OpenVPN network using their alias rather than their IP address. This may sound blasphemous but you can in Windows. That is if the VPN network is say 10.x.0.x I could connect to Comp4 or Comp2 using Comp4 or Comp2 not 10.x.0. 4 or 10.x.0.2 or whatever IP is allocated by the OpenVPN server. If the OpenVPN server has not been restarted then it will usually allocate the same IP every time the same client connects.

View 8 Replies View Related

Programming :: Unable To Use An Alias In The Ksh Functions

Apr 4, 2011

I have problem to use an alias that defined in ksh93 script,in the functions in the same script onm Linux.I definied an alias in main: alias echo='echo -e' in order that echo will read backslashes but when i executed it in function, the alias didnt work, and performewd a regular echo, without -e

cat test.ksh
#!/bin/ksh
alias echo='echo -e'
checkUsage

[code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved