LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-09-2003, 02:30 AM   #1
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Rep: Reputation: 15
I get errors when trying to run tar to extract


I am running Red Had 9. I am trying to run tar to extract a tar file. When I do, I get many messages saying "Cannot open: No such file or directory" I am running this command from the directory where the tar file is located:

tar zxvf jakarta-tomcat-4.1.29-LE-jdk14.tar.gz

Thank you in advance.
 
Old 11-09-2003, 03:27 AM   #2
Mrcdm
Member
 
Registered: Apr 2003
Location: Australia
Distribution: Debian 3, 31r0, 4, slackware, DSL, RH8.0/7, MDK9/10, et al. Vista is cute but not Linux - I tried
Posts: 70

Rep: Reputation: 15
try using tar -xzfv tar_archive_name.tar.gz

You need the minus sign in there
 
Old 11-09-2003, 04:36 AM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The dash is optional. First thing would be to make sure that you are in the directory or giving the full path (check) and that the filename is spelled correctly. (?) Not found is odd, though. I might say you maybe downloaded it as root (or whatever) and are now trying to access it as user, but that should give a different error message. Next, I'd run 'file' on it in case it isn't really a tar.gz, but that should also give a different error. Same thing regarding whether you have tar and it's on your path - wrong message, but maybe.

I'm guessing it's a typo. Are you using tab-completion? Getting the case right? The file does show in an 'ls'? Strange.
 
Old 11-10-2003, 09:59 AM   #4
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
I have made sure it is not a typo. I did, however, download it as root, then tried to extract it as another user. So, I deleted the file, then tried to cp it from the cdrom again as a different user. It said "permission denied". Is there a way to give that user the right permissions to do that?
 
Old 11-10-2003, 10:23 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
What are the permissions of the file
ls -l <file_name>

Use the chmod command to allow read / write for all users. Need to be logged in as root.
chmod 777 <file_name>

Last edited by michaelk; 11-10-2003 at 10:25 AM.
 
Old 11-10-2003, 11:46 AM   #6
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
Well I changed the permissions to 777 and still got the same errors.
 
Old 11-10-2003, 12:07 PM   #7
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Rep: Reputation: 30
it goes like this there are a user and group permissions on a object.. when you do ls -l you see:

r--rwxr-x bob root

The first three characters (r) give read access to bob
then the second three characters (rwx) give read, write, execute access to root
the last three characters (r-x) give access to all other users (and there is read, execute access)

they way to change those two users is to use the "chown" command and then change file permissions with chmod

chown gschrade <file>
chmod u+rwx <file>

This changes the file to look like this

rwxr--r-x gschrade root

and your file will work, suggest ya go online and search "chmod tutorial" to learn more bout this stuff

btw the chmod 777 is an old way of doing this, use the rwx way cuz its easier to understand
 
Old 11-10-2003, 12:09 PM   #8
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Rep: Reputation: 30
oops sry, the file should look like this after you change it:
rwxrwxr-x gschrade root

sry bout that
 
Old 11-10-2003, 12:10 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
There are also permissions on the directories. What directory are you trying to extract it to?
 
Old 11-10-2003, 12:32 PM   #10
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
I changed the permissions on the directory and that did the trick. Thank you very much!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
can not extract the tar.gz file sharad durgawad Linux - Software 3 10-05-2005 03:41 AM
using tar to extract properly xushi Slackware 9 03-05-2005 10:10 AM
How to extract a tar.gz file? deWin Linux - Newbie 3 11-10-2004 12:24 PM
tar extract fails dgermann Linux - Newbie 8 08-28-2004 12:26 PM
Choosing where to extract tar.gz Arclite Linux - Software 14 08-14-2003 04:57 PM


All times are GMT -5. The time now is 08:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration