/usr/bin/wc not available in the system
Please help!
I am new to Linux. I need to use wc command. If I run "which wc" the output is /usr/bin/wc However, /usr/bin/wc file is empty. wc command doesn't work at all. I would really appreciate any advice on how to install wc into my system or how to replace wc if something else can give me word count output. Thank you for any help, Inna This is output from lsb_release -a LSB Version: core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch Distributor ID: SUSE LINUX Description: SUSE LINUX Enterprise Server 9 (i586) Release: 9 Codename: n/a |
What do you mean "wc command doesn't work at all."?
Linux usually gives error messages if something is wrong, and when it is silent, it is either waiting for some input (you don't see a prompt), or it has completed the command (you get a prompt back). wc needs a filename in the current directory to count the words in that file eg wc mytextfile |
Thank you for answering.
Nothing at all happens. Prompt returns right away, but no any output. I am using it like this: /usr/bin/wc filename.txt If I go to /usr/bin directory and do ls -l ws, I am getting: -rwxr-xr-x 1 root root 0 Mar 9 10:49 /usr/bin/wc Was it not installed properly with Linux? What do I do? Thank you for you help, Inna |
wc is supplied by the coreutils package. You can check the integrity of the package with the command: "rpm -qV coreutils".
By empty, do you mean that ls -l /usr/bin/wc says that it has zero size? You could reinstall coreutils if so. If that is the only program in coreutils that shows up as bad, you could use the unrpm program and copy the wc program to /usr/bin/. |
It seems that you have a file called usr/bin/wc which is of zero length. So it is unlikely to work.
When I do ls -l /usr/bin/wc I see this: -rwxr-xr-x 1 root root 18348 Feb 13 2003 /usr/bin/wc* So something is very wrong with your installation. Is everything else working alright? If so, then I'd just reinstall wc, otherwise, it might be a good idea to start afresh. This is a very unusual situation, and I wonder how it happened. You haven't been "runnng as root" have you? |
I have no idea how it happened. The installation was done before me and all I need is to install small cron job on this machine (which is supposed to use wc).
Do you have an idea where I cat get/download wc program? Thank you. |
Quote:
|
Yes, thank you so much!
|
Welcome to LQ! :)
|
All times are GMT -5. The time now is 05:29 PM. |