Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 04-02-2007, 12:59 PM   #1
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Rep: Reputation: 15
tar file size limit


I'm working on a logging infrastructure for an application. There is a directory in which log files are created. Logrotate is run to rotate the files based on size. However, when the date changes all the files from that day are archived into a tar.gz file.

What is largest file size that tar can handle i.e. archive and compress? I read at some places it's 2GB. I'm using RHEL 4.0 ES Server.

Thanks in advance!
Old 04-02-2007, 01:09 PM   #2
LQ Newbie
Registered: Mar 2007
Distribution: Ubuntu, openSuSE
Posts: 8

Rep: Reputation: 0
For historical reasons numerical values are encoded in octal with leading zeroes. The final character is either a null or a space. Thus although there are 12 bytes reserved for storing the file size, only 11 octal digits can be stored. This gives a maximum file size of 8 gigabytes on archived files. To overcome this limitation some versions of tar, including the GNU implementation, support an extension in which the file size is encoded in binary. Additionally, versions of GNU tar from 1999 and before pad the values with space characters instead of zero characters.
This comes from the Wikipedia tarball page. The GNU Tar Manual, section 8 seems to indicate no limit when using GNU Tar. Of course, you might run into problems on other systems not using GNU tar.
Old 04-02-2007, 01:09 PM   #3
Senior Member
Registered: Oct 2003
Posts: 2,397

Rep: Reputation: 163Reputation: 163
I am unaware of any file size limit with tar or gzip per se. I currently have tar.gz backups in excess of 7GB. AFAIK the only limits imposed are those of the filesystem you are backing up to, eg FAT32 has a max 4GB single file size limit. Also, if you are backing up to DVD there may be issues with single file sizes greater than 2GB IIRC.
Old 04-02-2007, 09:09 PM   #4
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
I believe that the 2GB is due to the kernel not using large file support or something similar. RHEL 4 is pretty new and these issues should already be addressed. You shouldn't encounter the 2GB file size limit.

Old 04-03-2007, 01:08 AM   #5
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Original Poster
Rep: Reputation: 15
Thanks a lot, all of this is very useful!


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
is there a file size limit to tar backups? seanarthur Linux - Server 1 08-22-2006 10:01 PM
File Size limit? compu73rg33k Linux - Software 1 02-27-2005 11:11 PM
limit file size ust Linux - General 2 02-24-2005 08:33 AM
tar size limit burningodzilla Linux - General 8 09-26-2002 02:06 PM
file size limit jaysan Slackware 5 07-12-2002 04:43 AM

All times are GMT -5. The time now is 06:19 AM.

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