alias doesn't work


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting alias doesn't work
# 1  
Old 03-05-2009
alias doesn't work

Hi

I have put alias ll='ls -la' in .profile file but it doesn't work.

On hand it works it looks like the .profile file is not beeing read.

How to check whitch file is loaded? ,profile? .bash_profile?

My system: SunOS mion 5.10 Generic
Shell: /bin/pfksh

Thanks
# 2  
Old 03-05-2009
Add a line to the files .bash_login, .bashrc, and .profile. Make them something like:

Code:
echo "this is from .bashrc"

Then log into a fresh terminal and see which one(s) print. Then, you can put your alias in the proper place, or source your .profile in the one that does execute by adding this line to the file:

Code:
. ~/.profile

# 3  
Old 03-06-2009
ok thx I had 'bash' in .profile was loaded twice
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies

2. UNIX for Dummies Questions & Answers

Alias does not work with bash profile

Hi, Below is what i have in my profile: alias wldm='cd /opt/app/wls' If i use bash or ksh shell this alias does not work. What should be done for this alias to work with all these simultaneously -> No Shell, bash shell, and ksh shell (14 Replies)
Discussion started by: mohtashims
14 Replies

3. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

4. UNIX for Dummies Questions & Answers

Using alias to create subshell and work in it

using kerberos to access remote server. first I execute kshell to create subshell and then kinit username@domain in that subshell. After that it prompts to enter password. Since I need to do this over and over, I am trying creating alias. I tried kshell; kinit username@domain. Did not work,... (7 Replies)
Discussion started by: analyst
7 Replies

5. UNIX for Dummies Questions & Answers

A very simple script, but alias won't work

I am new to unix and therefore I did a lot of reading before posting. So please, if this has been answered before, forgive me for re-posting and point me to the right place for the answer. I have spent many hours searching the net and read over 50 posts in this forum and even tried a few thing but... (20 Replies)
Discussion started by: sssccc
20 Replies

6. Shell Programming and Scripting

Bash alias for complicated ls command does not work.

I'm trying to set up an alias in .bash_aliases to show just the filenames of the files in a directory, which the following command will do: ls -l | grep ^- | awk '{print $NF}' kjb.zip ap.zip tor.zip However when I set up the following alias in .bash_aliases: alias lf="ls -l | grep ^- |... (16 Replies)
Discussion started by: gencon
16 Replies

7. Shell Programming and Scripting

Global alias does not work in shell script

Hi Linux Set up - alias ls='ls -l' Then run script #! /bin/ksh sub() { ls } sub Is there any way to get it working. I don't want to define alias inside of the program Thank you (2 Replies)
Discussion started by: zam
2 Replies

8. Shell Programming and Scripting

What to do when mtime doesn't work?

I have a folder that I need to search for new files and copy on the latest. I've been using "-mtime -1" in my command line but it doesn't seem to work. I've been meaning to fine a different script because files are dropped into the folder all day long and because of the -mtime, I've only be... (19 Replies)
Discussion started by: bbbngowc
19 Replies

9. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

10. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies
Login or Register to Ask a Question