Alias /usr/bin to /bin in profile


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Alias /usr/bin to /bin in profile
# 1  
Alias /usr/bin to /bin in profile

Hi!

All the basic linux commands, ie. echo, find, etc, are located in /bin. I have a couple of programs that have these commands pointed towards /usr/bin, ie, /usr/bin/echo (even though the actual 'echo' command is in /bin). How can I alias or redirect or link the /usr/bin to /bin just for this particular user?

Thanks so much!
# 2  
Answer:
Code:
AIX:/home/vbe $ ll -ld /bin
lrwxrwxrwx    1 bin      bin               8 Sep 15 16:29 /bin -> /usr/bin
HP:  $ ll -ld /bin
lrwxr-xr-t   1 root       sys              8 Jun 23  2003 /bin -> /usr/bin

Most modern systems have all user commands in /usr/bin but for compatibility have a /bin which is a link to /usr/bin...
# 3  
I have both /bin and /usr/bin

Yes, my issue is that I have both a /usr/bin and a /bin. Just for this particular user it would be helpful to have some sort of link between the two folders.
# 4  
Why for only this user, why not just make symlinks and be done with it? Or, better yet, fix the broken scripts?
# 5  
hmm

The scripts aren't "broken". It's a little complicated, but they serve an assortment of solaris and aix systems, all of which have their binaries in what I would consider the "proper place", ie, /usr/bin. Look people, all I'm asking is if anyone can make some sort of alias or symlink work for this folder. If the answer is no, then that's fine. That means that I basically need to go through and set environment variables for /usr/bin on some machines and /bin on others. But honestly, that's not my preference.
# 6  
What I dont get is all the servers I just looked at (AIX, SOLARIS, HP-UX) the directory is /usr/bin and there is a link to it in / called /bin...
So what do you want to correct? (If if either /bin OR /usr/bin is in the PATH, it will work...)
# 7  
it might sound stupid but can't you make a symbolic link to user's /bin dir - like this - >
Code:
ln -s /usr/bin/* /yourUser/bin

?
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #901
Difficulty: Easy
Steve Jobs offered Linus Torvalds a job in 2000, on the condition that he stopped development on Linux.
True or False?

9 More Discussions You Might Find Interesting

1. BSD

FreeBSD: /usr/bin/ld not looking in /usr/local/lib

I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries. I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble: $ ./autogen.sh checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies

2. Solaris

How to link sed from /usr/bin/sed to /usr/local/bin/sed?

Hi Guys, OS:- Solaris 10 64Bit I have a small query. On one server a user is facing sed command issue. He gets error regarding sed for this location /users/hoy/2999/batch5/bin/internal.sh: /usr/local/bin/sed: not found How ever the sed is actually present at this location on server:-... (13 Replies)
Discussion started by: manalisharmabe
13 Replies

3. Solaris

What is the difference between xpg4/bin and usr/bin?

Hi Experts, I found that the same commands(sort, du, df, find, grep etc.) exists in both dir. What is the difference to use them? i.e: to use xpg4/bin/grep and usr/bin/grep My OS version is SunOS 5.10 Regards, Saps (7 Replies)
Discussion started by: saps19
7 Replies

4. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

5. Red Hat

/usr/bin/find && -exec /bin/rm never work as expected

hi there, Would you able to advise that why the syntax or statement below couldn't work as expected ? /usr/bin/find /backup -name "*tar*" -mtime +2 -exec /bin/rm -f {} \; 1> /dev/null 2>&1 In fact, I was initially located it as in crontab job, but it doesn't work at all. So, I was... (9 Replies)
Discussion started by: rauphelhunter
9 Replies

6. Solaris

How do I link ld in /usr/ucb/ to /usr/ccs/bin?

Hi all, below is the problem details: ora10g@CNORACLE1>which ld /usr/ucb/ld ora10g@CNORACLE1>cd /usr/ccs/bin ora10g@CNORACLE1>ln -s /usr/ucb/ld ld ln: cannot create ld: File exists ora10g@CNORACLE1> how to link it to /usr/ccs/bin? (6 Replies)
Discussion started by: SmartAntz
6 Replies

7. UNIX for Dummies Questions & Answers

Difference between /bin, /usr/bin, /sbin ?

Hi All, Can somebody tell me the difference between /bin, /usr/bin, /sbin ? Thanx in advance, Saneesh Joseph (3 Replies)
Discussion started by: saneeshjose
3 Replies

8. UNIX for Dummies Questions & Answers

Better than asking about /usr/bin/cd...

Why does /usr/games/banner have a man page??? And why in the name of Ritchie is it in /usr/games?? Man, what a crappy game... (1 Reply)
Discussion started by: LivinFree
1 Replies

9. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies

Featured Tech Videos