LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2009, 06:47 PM   #1
Juicyapple
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
where is TAR ? bash: tar: command not found


Hello,
How can i extract a .tgz file ?

tar -zxvf sample.tar.gz gives the result --> bash: tar: command not found

echo $PATH gives the result --> /usr/local/bin:/bin:/usr/bin

Could someone explain ?
 
Old 06-09-2009, 07:19 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, looking at this Suse v9 server in front of me, its /bin/tar.
Maybe you could tell us which distro & version you've got?
Also, this will find it (sic)

find / -name tar -type f -print 2>/dev/null

run as root
 
Old 06-09-2009, 07:46 PM   #3
flakblas
Member
 
Registered: Jun 2009
Location: Maryland
Distribution: Fedora, CentOS, RHEL, Ubuntu
Posts: 41

Rep: Reputation: 3
Another quick way is to do
Code:
whereis tar
This isn't nearly as thorough as using find but it will usually get the job done.
 
Old 06-09-2009, 08:22 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Tar is in /bin/tar.

tar is a GNU package, and so should be there, what distro are you using?
 
Old 06-09-2009, 09:05 PM   #5
Juicyapple
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
re: distribution
The server is a Hosted Server. running PLESK 8.4.
System info is as follows.
'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu'

I have only SSH access (Chrooted),
however the above posted commands i cannot seems to run with success.
bash: whereis: command not found
bash: uname: command not found
 
Old 06-10-2009, 01:18 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
try my 'find' cmd as root
 
Old 06-10-2009, 01:58 AM   #7
Duckslammer
LQ Newbie
 
Registered: Apr 2009
Distribution: Xubuntu
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by Juicyapple View Post
re: distribution
The server is a Hosted Server. running PLESK 8.4.
System info is as follows.
'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu'

I have only SSH access (Chrooted),
however the above posted commands i cannot seems to run with success.
bash: whereis: command not found
bash: uname: command not found
All these commands would usually be found in /bin and /usr/bin and there is no good reason for a hosted server to not allow you to have them.

You don't need to run find as root. What is the output of:

2>/dev/null find / -type f -name tar

But can you get root? If the file is not found, you may be able to load it via yum.

Last edited by Duckslammer; 06-10-2009 at 02:00 AM.
 
Old 06-10-2009, 08:32 AM   #8
Juicyapple
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
The final word: ...... i contacted the Host Provider.........Yes TAR, GZIP and other utilities are infact installed however since my SSH access was restricted to "bin/bash ( Chrooted )" i am unable to utilize TAR. It is simply a permission issue. Thanks all !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
tar-command not found while compiling glibc-libidn-2.7.tar.bz2 of lfs6.3 aditya_gpch Linux From Scratch 1 05-13-2008 11:27 PM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
need some help with muli-volume tar (ubuntu, bash, gnu tar) MattCarp Linux - General 4 06-05-2006 08:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration