Operating System - HP-UX
1833044 Members
2513 Online
110049 Solutions
New Discussion

Re: tar creating 0 byte file

 
Abhilash Krishnan
Frequent Advisor

tar creating 0 byte file

Hi all
while i am trying to tar one of my dab file having size 2Gb it creating 0 byte tar.Hence creating problem.Please help me out.
15 REPLIES 15
Abhilash Krishnan
Frequent Advisor

Re: tar creating 0 byte file

Hi all
while i am trying to tar one of my dbf file (database file)having size 2Gb it creating 0 byte tar.Hence creating problem.Please help me out.
Taifur
Respected Contributor

Re: tar creating 0 byte file

Hi Biju

Follow below steps,

#tar -cvf yourfilename.tar yourfilename

Example:
1. Archive all files and directories in directory my_project in the current directory to a file called my_project.TAR, also in the current directory:

#tar -cvf my_project.TAR my_project

2. Archive files from /usr/include and /etc:

#tar cv -C /usr/include . -C /etc .

Rgds//
Taifur
Dennis Handly
Acclaimed Contributor

Re: tar creating 0 byte file

tar is suppose to be able to handle 8 Gb on 11.23. What OS version or tar patch do you have? 11.11 only handles 2 Gb.
Johnson Punniyalingam
Honored Contributor

Re: tar creating 0 byte file

Hi Biju,

>>while i am trying to tar one of my dab file having size 2Gb it creating 0 byte <<

Are you trying to creat tar file to Tape or to you local drive..?

creating tar file to the Tape
==============================
tar -cvf /dev/rmt/0m

Creating tar file local
=======================
tar -cvf

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Avinash20
Honored Contributor

Re: tar creating 0 byte file

"while i am trying to tar one of my dab file having size 2Gb it creating 0 byte tar.Hence creating problem.Please help me out. "

I did the same and my tar file also became 0KB while extracting
How..

Tar the file (/etc/passwd)
tar -cvf /tmp/passwd.tar /etc/passwd
while extracting,
# tar cvf /tmp/passwd.tar
instead of
# tar xvf /tmp/passwd.tar

Also are you able to create a tar file of 2 GB of less.
If yes, you have to install the latest tar patch which support upto 8Gb of size

For 11.11 -- PHCO_36587
For 11.23 -- PHCO_33431

All the best !!
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: tar creating 0 byte file

Yo...

I have assigned points to 5 of 65

You have assigned so less points to your post

Please assign points to your post
Refer http://forums11.itrc.hp.com/service/forums/helptips.do?#33

Assigning points is just a way of saying Thanks for the answers :)

"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Patrick Wallek
Honored Contributor

Re: tar creating 0 byte file

>> 11.11 only handles 2 Gb.

With patches I believe 11.11 can handle 8GB file with tar. Unfortunately the patch DB appears to be down right now so I can't search for the appropriate patch to enable this.
Robert-Jan Goossens
Honored Contributor

Re: tar creating 0 byte file

Link to the 11.11 tar patch PHCO_36587

http://www13.itrc.hp.com/service/patch/patchDetail.do?BC=main|search|patchDetail{PHCO_29229,{hpux:11.00,}}|patchDetail{PHCO_28992,{hpux:11.11,}}|&patchid=PHCO_36587&sel={hpux:11.11,}
Abhilash Krishnan
Frequent Advisor

Re: tar creating 0 byte file

Hi thanks for your reply

I am trying tar on tape
tar -cvf /dev/rmt/0mn

then my orignal file becomes zero byte.
Suraj K Sankari
Honored Contributor

Re: tar creating 0 byte file

Hi,

Is there any error messages you are getting at you terminal or syslog.log
please provide the output of your command
tar -cvf /dev/rmt/0mn

Suraj
Abhilash Krishnan
Frequent Advisor

Re: tar creating 0 byte file

no error was there
Suraj K Sankari
Honored Contributor

Re: tar creating 0 byte file

Hi,

If you don't mind then please post the output of your command

tar -cvf /dev/rmt/0mn

Suraj
Abhilash Krishnan
Frequent Advisor

Re: tar creating 0 byte file

actually i right now i dont have ouput of that now and i cant run that command right now because database is running.
Suraj K Sankari
Honored Contributor

Re: tar creating 0 byte file

>> then my orignal file becomes zero byte.

If you give the same command to other file not your database file what you are getting?

Still the original file becomes Zero.

If yes then please post the output along with your command.

Suraj
Abhilash Krishnan
Frequent Advisor

Re: tar creating 0 byte file

hi now i am not on the site i will run the tar command and share the output afterwords
thanks for you reply.