[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/
>loop.jfs/
>loop.jfs/1
>loop.jfs/2
>loop.jfs/3
>loop.jfs/4
>loop.jfs/5
>
>[sunny at atticus tmp]# tar cvf tar.ext loop.ext3
>loop.ext3/
>loop.ext3/5
>loop.ext3/1
>loop.ext3/4
>loop.ext3/2
>loop.ext3/3
>
>[sunny at atticus tmp]# tar cvf tar.xfs loop.xfs/
>loop.xfs/
>loop.xfs/1
>loop.xfs/2
>loop.xfs/3
>loop.xfs/4
>loop.xfs/5
>
>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.

-p




-- 
~~~oO00Oo~~~
Pete Wright
pete at nomadlogic.org
www.nomadlogic.org/~pete





More information about the talk mailing list