1753905 Members
9975 Online
108810 Solutions
New Discussion юеВ

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.