Calling alias


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Calling alias
# 1  
Old 11-20-2008
Lightbulb Calling alias

I have created a shortcut for the file kill_process.sh as shown below.

alias kill_process="sh /root/kill_process.sh"

It is working as per my expectations. But I have 2 questions.
1) Is there any better way?
2) How do I check what does kill_process link to?
# 2  
Old 11-20-2008
hi,
You don't really need an alias do You? Name the program file kill_process, make it executable (chmod +x kill_process) and place it somewhere in Your PATH, in /usr/local/sbin for example. To show Your aliases, use the command alias without arguments.

/Lakris
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

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

2. UNIX for Dummies Questions & Answers

ALIAS

how to make alias perament? I have edited in .bashrc also but no use:(.How to manke it perament (3 Replies)
Discussion started by: kkalyan
3 Replies

3. UNIX for Dummies Questions & Answers

alias

Hello. Q:Is it possible to create an alias for "nedit *. ". If it is how does it look like? Tks. (1 Reply)
Discussion started by: geko
1 Replies

4. UNIX for Dummies Questions & Answers

using alias

I need to login to one server and then switch the user and set a number alias. But i cant modify the .profile file. I have one script avi1.sh $ more avi.sh sudo su - bil sh avi1.sh and in home directory of bil i have avi1.sh that says $ more avi1.sh alias l='ls -ltr' alias b='cd... (7 Replies)
Discussion started by: blackeyed
7 Replies

5. UNIX for Dummies Questions & Answers

alias

Hi, I have created alias in UNIX environment (ie in .cshrc file). But when i use the alias in the UNIX script, getting an error message as that is not found. But when i use that alias, outside the script it is working fine. Let me know if you need more details For example: alias cderror... (6 Replies)
Discussion started by: Naveen_5960
6 Replies

6. UNIX for Dummies Questions & Answers

Help with Alias

Hi, I have a software package consisting of a group of BASH shell scripts. There is a master script which calls a series of subscripts. To run the software users must open the master script, modify and save it, and then run it. To open the script you can either double-click on it, or you can... (2 Replies)
Discussion started by: msb65
2 Replies

7. UNIX for Dummies Questions & Answers

alias help

Hi I have a problem when i try to set any thing as alias it works say alias sasa="cd /home/hghgg" but when i close the terminal it does not work (5 Replies)
Discussion started by: shafique
5 Replies

8. UNIX for Dummies Questions & Answers

Alias

Hello, I'm a beginner to Unix and I want to create an alias that lists the given directory in long format; the alias should use a pager to display the result. Thanks in advance. (2 Replies)
Discussion started by: guelpth
2 Replies

9. UNIX for Dummies Questions & Answers

Alias

I'm trying to do the following: Create an alias called whopw that will change directory to the /etc directory and grep the password file for my username to return my password file entry. One assumption: Once the alias works, I will be letting all of my friends copy and use it. In other... (2 Replies)
Discussion started by: klannon
2 Replies
Login or Register to Ask a Question