LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   cat (https://www.linuxquestions.org/questions/linux-from-scratch-13/cat-14216/)

notsoevil 02-13-2002 11:12 PM

cat
 
I am at the point where I am 'configuring essential software' per Chapter 6.

The setup of the vimrc file fails, because using cat says:

bash: /usr/bin/cat: No such file or directory

Back on Textutils* installation, cat was moved to /bin

If I explicitly use /bin/cat instead of just cat, all is well.

/bin is in my PATH

Most other programs (ping,less,tar) from /bin work fine without explicitly calling the full path.

I can solve this in the interim with a symlink in /usr/bin ..

.. but why is this happening?

Mik 02-14-2002 03:37 AM

The location of cat is hardcoded into bash. So your path won't matter. That's why you should install textutils before you install bash so it can find cat in the right location. After installing text utils make sure there are no symbolic links in /usr/bin to cat and try rebuilding bash to see if that helps.

notsoevil 02-14-2002 08:06 AM

Did I miss a step in the book, compiling bash for a third time?

lfslinux 02-14-2002 10:16 AM

Quote:

Originally posted by notsoevil
Did I miss a step in the book, compiling bash for a third time?
Honestly, I don't think cat is built-into bash. The thing you may be suffering from is a hashed value of bash's awareness where cat is expected.

Run this: type cat

It may output this:
cat is hashed (/usr/bin/cat)

If that's the case, run: hash -r

that'll remove the hash table and start looking for things in $PATH again.


All times are GMT -5. The time now is 03:02 PM.