[nycbug-talk] tar question

Pete Wright pete
Sat Jun 19 21:10:36 EDT 2004

Sunny Dubey wrote:

>On Saturday 19 June 2004 07:39 pm, Pete Wright wrote:
>>I have a wierd question about "tar".  how is the order of what it put
>>into the archive dictated?  I assumed it was alphabetic, but I've been
>>putting a file to tape and is not in alpha order.  It's not like it
>>matters really but I was woundering if anyone has some insight to this.
>>the man page does not shed any light into this.
>IIRC this is done by directory order, which in turn is presented to tar by 
>the actual file system itself
>a test:  (yes yes, on linux, whatever):
>in each dir I have done:
>for i in 5 1 4 2 3 ; do touch $i ; done
>now I tar:
>[sunny at atticus tmp]# tar cvf tar.jfs loop.jfs/
>[sunny at atticus tmp]# tar cvf tar.ext loop.ext3
>[sunny at atticus tmp]# tar cvf tar.xfs loop.xfs/
>notice how XFS and JFS do it by name order, but Ext3 does it by creation 
woah that's really interesting, this may explain alot (we use XFS on 
most of our large NAS's).  The slice in question is a ext3 NFS 
share...the archiving machine is running fbsd.  so i bet it's done by 
atime or ctime then, which makes alot of sense for an archiving program.


Pete Wright
pete at nomadlogic.org

More information about the talk mailing list