I'm trying to figure out why my cat command refuses to acknowledge the file I provide.
I know that cat ignores filenames when they are absent or a - is provided, but I am not doing either of those things. The command used to work, but now it won't.
I am using a WSL Ubuntu subsystem on Windows 10. I have a simple text file called hello.txt. I am testing with the command cat hello.txt. I am in the proper directory as well. However, cat hangs and waits for me to type something into the terminal, which it then outputs.
If I run type -a cat I get this output
cat is /home/awallace110/.cargo/bin/cat
cat is /usr/bin/cat
cat is /bin/cat
What is going on?
cat is /home/awallace110/.cargo/bin/cat cat is /usr/bin/cat cat is /bin/cat– user521173 Apr 05 '22 at 21:23/home/awallace110/.cargo/binbehind/bin– jesse_b Apr 05 '22 at 21:24/home/awallace110/.cargo/binbehind/bin. Also, I don't think it's the crates version, I never added that to my rust Cargo.toml file. – user521173 Apr 05 '22 at 21:43/usr/bin/cat hello.txtand if that works but/home/awallace110/.cargo/bin/cat hello.txtdoes not work you know that version of cat is no good. You can either remove that version of cat or find what is setting your path (likely in .profile or .bash_profile) and modify it there. How to correctly add to path – jesse_b Apr 05 '22 at 21:46/usr/bin/cat hello.txtgave me the proper response. I deleted and re-added the cat file in my/home/awallace110/.cargo/bindirectory. When running cat in the terminal, it works as normal now, but I have to authenticate as root, which isn't a huge problem. I guess my PATH variable was telling cat to look into the wrong directory that had a faulty version of cat. Not sure why deleting and re-adding it fixed the issue, but it did. Thank you very much! – user521173 Apr 05 '22 at 22:08