Skip to contentSkip to conversation

How can I move /usr/bin, /usr/lib (etc.) files?

DISCUSSION Jamie Risk 2 participants 3 messages Jan 2, 2003

lore
Share & tools
lore

Jamie Risk

author
#0 lore raw

Moving the contents of my "/usr/bin" directory is simple enough: "mv /usr/bin [newdirectory]" does the trick; but finding the programs in the new location seems to be the kicker.

I'm using bash, so editting the ".profile" file in the user's home directory seems to have done the trick for the most part, although when I invoked "man" (as in "man bash") after moving the directory, updating ".profile" and re-login, I get messages akin to "/usr/bin/nroff not found" and "/usr/bin/tr not found".
* Where, in general, do programs (such as man) get there path information
from?

Similarily, I'd like to move the /usr/lib directory to another location.
* Should I download src for packages that I'm using and recompile with
appropriate destinations chosen in the configure scripts?

Some information about my system is available at "http://members.rogers.com/riskweb3/Linux/ibm_linux_box_info.html"

Let me know if you want to see more info ...

Thanks,
- Jamie

p.s. I've been using unix systems for years and have always relied on services of others to administrate my environments. Recently I started using a minimalist Linux installation to catalyze my unix admin learning process.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

author
#1 lore raw
Quoted 1 line · Chris

bad bad idea. ... why would you want to do this?

The reasons _are_ fickle but:
* I'm trying to develop an understanding of how linux operates...
* Most unix environments I've worked on were set up with /usr/local/bin
etc. so I'm used to this
* I'm having fun compiling all the src packages anyway, so if it's just a
case of specifying in the "configure" process of make and header file generation, then I'd give it a whirl.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#2 lore raw
In reply to Jamie Risk
Quoted 2 lines

I'm using bash, so editting the ".profile" file in the user's home directory seems to have done the trick for the most part,

You may also want to modify /etc/environment, so that programs other than Bash get the new PATH as well.

(Your system may call /etc/environment something else. Look in /etc/pam.d/login or /etc/security.d/login for pam_env.so for some ideas)

Quoted 6 lines

although when I invoked
"man" (as in "man bash") after moving the directory, updating ".profile" and re-login, I get messages akin to "/usr/bin/nroff not found" and "/usr/bin/tr not found".
* Where, in general, do programs (such as man) get there path information
from?

In general, it depends on the program. man, though, usually looks in /etc/manpath.conf. (man 5 manpath)

Quoted 3 lines

Similarily, I'd like to move the /usr/lib directory to another location.
* Should I download src for packages that I'm using and recompile with
appropriate destinations chosen in the configure scripts?

That might be necessary. If you're lucky, though, you might be able to get away with adding the new location of /usr/lib to /etc/ld.so.conf and the environbment variable LD_LIBRARY_PATH (same syntax as $PATH).

Your life will almost certainly be drastically easier if you create a symlink from /usr/lib to the new location...

Steven Smith,
[email protected].