Operating System - HP-UX
1837230 Members
2191 Online
110115 Solutions
New Discussion

Re: Problems with tar in 11.11

 
SOLVED
Go to solution
Lora Ganeva
Regular Advisor

Problems with tar in 11.11

I wamt to extract a *.tar archive but it seems that the tar command doesn't work at all..Any help would be greatly appreciated
10 REPLIES 10
Luc Bussieres_1
Trusted Contributor

Re: Problems with tar in 11.11

Hi,

What do you mean by does not work?
What is the syntax of the tar you are running?
what is the error message?

Luc
Steve Steel
Honored Contributor

Re: Problems with tar in 11.11

Hi

What happens


tar -tvf file

Also ll of archive

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
PIYUSH D. PATEL
Honored Contributor

Re: Problems with tar in 11.11

Hi,

# tar -xvf *.tar

What command are you giving and what is the error message.

First do a

#tar -tvf *.tar

to find out the contents of the archieve and then extract it.

Piyush
Jeff Schussele
Honored Contributor

Re: Problems with tar in 11.11

Hi Lora,

First thing to do is check exactly where the tar command is running from - do
which tar
should report /usr/bin/tar
Then check it with the file command
file /usr/bin/tar
Should report PA-RISC1.1 shared executable dynamically linked

Then you should check the tar file itself
what does
tar tvf filename.tar
show?

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Lora Ganeva
Regular Advisor

Re: Problems with tar in 11.11

tar fxv filename.tar -C /home
No error messages at all
Solution

Re: Problems with tar in 11.11

What is the exact syntax you are attempting to use?

# tar xvf myarchive.tar

Should work if the archive is in tar format - check using the file command:

e.g.
# file myarchive.tar
myarchive.tar: tar file

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Lora Ganeva
Regular Advisor

Re: Problems with tar in 11.11

Yes the archive is in tar format..but the syntax that You told me does not extract it

Re: Problems with tar in 11.11

Your arguments are in the wrong order - the f argument is expecting the name of the archive to follow it

tar xvf filename.tar -C /home

should work

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Luc Bussieres_1
Trusted Contributor

Re: Problems with tar in 11.11

Lora,

I'm not sure what the -C does but to extract your /home directory the syntax should be:

tar xvf filename.tar /home

Luc
Lora Ganeva
Regular Advisor

Re: Problems with tar in 11.11

Thank You Sir..the error was xvf ..not fxv as I used