12-27-2009
Hi,
add a file for eg .aliases, and define all your aliases in this file, then call this file from your .bash_profile(of the user, you r logging in with).
cheers
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Having a memory lapse:
If I redefine a command using an alias or a function - How do I access the "real" command without specifying an absoulte path:
i.e.
function man
{
/usr/bin/man |more
}
alias ls='/usr/bin/ls -l'
How do I specify the ls or man command above without the... (6 Replies)
Discussion started by: kornshellmaven
6 Replies
2. Shell Programming and Scripting
I have a program to scan the log files and I want to pipe the output to 'less'.
I want to create an alias such that following are equivalent
scanlog chunky.lst = /udd/n2man/utils/scanlog chunky.lst|less
where chunky is user supplied file which can change.
Is this possible as an alias or... (1 Reply)
Discussion started by: ospreyeagle
1 Replies
3. UNIX for Dummies Questions & Answers
Some Unix systems won't enable you to do the following. What danger do you see lurking in this alias?
(a) alias who (b)who -a
Do you know it? Thanks! (1 Reply)
Discussion started by: jayyu317
1 Replies
4. UNIX for Dummies Questions & Answers
Sorry if this should be in the shell scripting area, it seemed too foolish to be answered there
--------------------------------
In my .bash_profile i added:
alias "sudo su"='bash hard link with bash script at end'
It didn't work was a result, what is the quotation problem?
------
... (2 Replies)
Discussion started by: cleansing_flame
2 Replies
5. UNIX for Advanced & Expert Users
Hello,
I have created following alias in csh
lab 'rlogin -l user23 complab23'
but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets... (4 Replies)
Discussion started by: neerajrathi2
4 Replies
6. Shell Programming and Scripting
I am using following alias in csh to find process.
alias pp 'ps -ef | grep \!*'
>pp java
root 27742 27558 0 15:55 pts/12 00:00:00 grep java
but It does not work in bash.
alias pp='ps -ef | grep \!*'
#pp java
grep: java: no such file or directory
How can I use this feature... (1 Reply)
Discussion started by: hcliff
1 Replies
7. UNIX for Dummies Questions & Answers
hi all,
I setup a new server using centos 5.0 with webmin installed and its working fine. the only problem i found is that I now cant ssh into the box anymore for some reason. I am able to ssh out of it no problem tho. I did check to see if ssh was running and it was. I did the following to... (12 Replies)
Discussion started by: mcraul
12 Replies
8. UNIX for Dummies Questions & Answers
how would i turn alias off all together? (1 Reply)
Discussion started by: JamieMurry
1 Replies
9. Solaris
OS = Solaris 8
Issue: alias not working for root, but working for regular users
# grep root /etc/passwd
root:x:0:1:Super-User:/:/sbin/sh
# alias dir=ls
# dir
dir: not found
# alias dir="ls -l"
# dir
dir: not found
# alias dir='ls -l'
# dir
dir: not found
# alias... (2 Replies)
Discussion started by: aixlover
2 Replies
10. UNIX for Dummies Questions & Answers
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies
ALIASES(5) File Formats Manual ALIASES(5)
NAME
aliases - aliases file for sendmail
SYNOPSIS
/etc/aliases
DESCRIPTION
This file describes user id aliases used by /usr/sbin/sendmail. It is formatted as a series of lines of the form
name: name_1, name2, name_3, . . .
The name is the name to alias, and the name_n are the aliases for that name. Lines beginning with white space are continuation lines.
Lines beginning with `#' are comments.
Aliasing occurs only on local names. Loops can not occur, since no message will be sent to any person more than once.
After aliasing has been done, local and valid recipients who have a ``.forward'' file in their home directory have messages forwarded to
the list of users defined in that file.
This is only the raw data file; the actual aliasing information is placed into a binary format in the files /etc/aliases.dir and
/etc/aliases.pag using the program newaliases(1). A newaliases command should be executed each time the aliases file is changed for the
change to take effect.
SEE ALSO
newaliases(1), dbm(3X), sendmail(8)
SENDMAIL Installation and Operation Guide.
SENDMAIL An Internetwork Mail Router.
BUGS
Because of restrictions in dbm(3X) a single alias cannot contain more than about 1000 bytes of information. You can get longer aliases by
``chaining''; that is, make the last name in the alias be a dummy name which is a continuation alias.
4th Berkeley Distribution October 22, 1996 ALIASES(5)