-
tar command not found
I got the following error message when using tar:
"bash: tar -zhcvf : command not found"
When I used which tar I got "/bin/tar"
The path in my .bash_profile reads:
$PATH=/usr/sbin:/sbin:/bin
I assume something is wrong with PATH but I'm not sure what.
I'm using Fedora 4.
Thanks,
Bill
-
do you have your path exported?
might wanna add /usr/bin ... as a note
did you relogin after making changes
soule
Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey
IRC #linuxn00b
Support your Distro.
Slackware Store
Archlinux Schwag
-
set | grep PATH
You can use that command to check if you have the PATH variable exported.
djserz.com.ar
"All the drugs in this world won't save you from yourself..."
-
hopefully its more like export PATH=/some/new/path/to/something/exciting:/second/cool/path:$PATH (<-- for existing paths attached to the end of your new path)
you can also set the variable earlier in the profile and export it later with PATH=.... and export PATH somewhere else, but okham's razor, use the one liner
-
tar command not found
Many thanks for the responses.
I do have the path exported. It's a line or two under the PATH. I also added
user/bin and "set | grep PATH" which gave me:
PATH=/usr/kerberos/bin:/usr/local/bin:bin:/usr/bin/:usr/x11R6/bin:/usr/sbin:
sbin:/bin/:usr/bin
What I don't understand is that I can use other commands in /bin such as cp,
su, etc but not tar.
Another thing I don't understand about PATH is why there is a difference between the PATH in my .bash_profile and the one I got using grep.
Thanks,
Bill
-
because you have a global path also, which is set somewhere else
like in slackware its /etc/profile
make sure tar is executable.
try using the absolute path first ie
/bin/tar -xvzf filename
to see if it works
it may be a bug or something other than your path
Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey
IRC #linuxn00b
Support your Distro.
Slackware Store
Archlinux Schwag
-
maybe because you had /usr/bin/ instead of /usr/bin
dunno if the path variable is that insitant on correctness.
irc.freenode.net #justlinux The Not So Official JL IRC Channel.
¤ Debian ¤ Apt-Get ¤
-
dunno if the path variable is that insitant on correctness.
it probably is
soule
Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey
IRC #linuxn00b
Support your Distro.
Slackware Store
Archlinux Schwag
-
Um, guys?
Originally Posted by PhilBill
"bash: tar -zhcvf : command not found"
bash thinks the command that got run was "tar -zhcvf ", not plain old "tar"...
PhilBill, what were you running when you got this error? Did you have a backslash after the "tar" in the command? Did you have the first two words in double or quotes, like this:
"tar -zhcvf" filename
or this:
'tar -zhcvf' filename
?
-
heh, talk about not seeing the forest for the trees
soule
Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey
IRC #linuxn00b
Support your Distro.
Slackware Store
Archlinux Schwag
-
lol, bwkaz rocks
djserz.com.ar
"All the drugs in this world won't save you from yourself..."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|