[nycbug-talk] tar question
Sunny Dubey
sunny-ml
Sat Jun 19 19:59:37 EDT 2004
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
order.
Sunny Dubey
More information about the talk
mailing list