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


ADVERTISEMENT

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

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

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 :: Alias To Run A Program In The Background?

Mar 4, 2011

I'm running Utorrent server and I figure I would create an alias to launch the program and run it in the background.alias utorrent='/home/user1/software/utorrent-server-3.0/utserver &'It seems to run the program but the associated webui program is flaky and won't start correctly.If I manually go to the specified path and run the command ./utserver & , I never seem to have an issue with the webui.I was wondering if this could possibly have anything to do with using the '&' ampersand operator in an alias.

View 2 Replies View Related

General :: How To Save Alias Permanent

Nov 5, 2009

how to save alias permanent

View 4 Replies View Related

General :: Set Alias In Bash Scripts

Sep 6, 2010

I tried this to set an alias: alias lsf='ls -f' and it works fine... But when I put it in a bash script it doesnt work. SCRIPT:

cd ~
alias lsf='ls -F'
lsf

I get the following output: line 3: lsf: command not found

View 2 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

General :: Escape Commands In A Bashrc Alias?

Sep 17, 2010

I need to occasionally touch a file with the current timestamp as the filename. I would do so this way:

touch `date "+%Y-%m-%d_%H-%M"`.txt

However, I'd like to define an alias for this. When I try adding to the bashrc this:

alias td="touch `date "+%Y-%m-%d_%H-%M"`.txt"

the result is that the filename is the same during the entire session, since the `date ..` gets calculated just once during login...

How can I get the command to expand only when I call the alias? Or must I use a function for this?

View 1 Replies View Related

General :: How To Change Default Vi Alias In Fedora 14?

May 25, 2011

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 vi="vim_wrapper"

in ~/.bashrc or /etc/bashrc, but take no effects. So How to change the default vi alias vi='vim' to vi='vim_wrapper'?

View 1 Replies View Related

General :: Creating An Alias On Universtiy Server?

Jan 15, 2010

I need to make a alias and I am a little confussed how to do it. As some websites say it has to be in profile and other says it goes in bashrc.on the server I have these files
bash_historybash_profilebashrccshrcdtprofileloginmysql_historynewsrcI been trying to do this and think may have problem now as when I log in I get error it says bash_profile syntax error unexpected token 'fi'

View 9 Replies View Related

General :: Alias Cd Cmd Way Whensover Enter Any Directory

Mar 12, 2010

the problem is that i want to alias my cd cmd in such a way that whensover i enter any directory, a ls cmd i automatically performed. i tried ' alias cd='cd $1;ls' , but it is not working.

View 5 Replies View Related

General :: Using An Alias Inside A Function In Bash?

Jun 8, 2011

I have trouble with using an alias inside aash function. I would like to ssh into multiple machines by executing:ssh machine To achieve this, I put something like the following into my ~/.bashrc:

alias machine='user@machine'
ssh()
{

[code]....

View 1 Replies View Related

General :: Bash Function/alias For Package Managers?

Jul 6, 2010

I have packer installed for AUR packages, but I want to be able to use the pacman command for both. I think I will need a function for this -- what I mean is that whenever I use pacman, it will try using packer and if that fails (invalid option) it will use pacman-color. It could also decide which program to use based on the arguments. I can't just use packer (alias pacman='sudo packer') because packer doesn't have some options like -R to remove packages. I want to always use it to install and upgrade packages however, because It can install from the default repositories as well as AUR.

Does someone know how to accomplish this, or could point me in the right direction? I'm new to bash scripting. error (e.g. pacman -V prints packer: Option '-V' is not valid.).

View 1 Replies View Related

General :: Ifconfig Alias Address Assigned By DHCP

Aug 13, 2010

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 the command:
ifconfig eth0:0 192.168.1.11 up

View 5 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 For Changing To Directory And Displaying All Files

Jul 4, 2011

I'm trying to setup an alias, that when I change to another directory, any directory, it will also display all its contents like ls -al:Well, that doesn't work. I guess it's an issue with the use of wild-cards.Maybe I should define a new, so far unused, name for the alias like cdl for example.Would be great if someone could help me. I search in several examples for bash aliases but couldn't find the right solution.

View 9 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

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

General :: Bcc Copy Is Not Getting Delivered To Email Alias (at Local Server)

Mar 7, 2010

my mail server [URL] is hosted abc@[URL] is a pop id below are alias:

user1@[URL]
user2@[URL]
user3@[URL]

fetchmail is configured to download all mail for alias email id on local linux server and distribute to local users.

fetchmailrc config:
[Code]....

everything works fine except bcc copy is not getting delivered to email alias (at local linux server). It is delivered to local postmaster account :abc@[URL] (in Linux server) I have tried all envelope option in fetchmailrc file, but it did not work.

View 1 Replies View Related

General :: Remove The Network Alias (ex: Ifcfg-eth0:2)from RHEL5

Mar 9, 2011

how to remove the network alias (ex: ifcfg-eth0:2)from RHEL5, i had deleted the ifcfg-eth0:2 file from /etc/sysconfig/network-scripts/ifcfg-eth0:3but i can still see the entry in the graphical network configuration after i issued the command system-config-network, i want to remove it from there.

View 3 Replies View Related

General :: Postfix Error: Address Not Found In Virtual Alias Table

Sep 8, 2010

I setup a virtual server with these configurations:

1. Mail server: POSTFIX / DOVECOT
2. Webmin / Virtualmin

I am getting email to desired folders locally but I am not getting email from outside to desired users. Emails are bounced back with message "Address not found in virtual alias table".

Recent log errors are:

Sep 8 04:25:49 server1 postfix/smtpd[28002]: cannot load Certificate Authority data
Sep 8 04:25:49 server1 postfix/smtpd[28002]: warning: TLS library problem: 28002:error:02001002:system library:fopen:No such file or directory:bss_file.c:122:fopen('/etc/pki/postfix/root.crt','r'):

[code].....

View 3 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

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

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







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