building a large file

Andrew Dalke dalke at acm.org
Sat Apr 14 12:20:02 EDT 2001


Emile van Sebille asked:
>Doesn't tar do exactly this?

where "this" was defined by Thomas Duterme to mean:
>> for x in os.listdir('.'):
>>     os.system('cat '+x+' >> mylargefile)

No, tar doesn't do that because it adds data needed to
extract each file.  On the other hand, cat does:

cat * > mylargefile

though this won't read the dotfiles.

                    Andrew
                    dalke at acm.org






More information about the Python-list mailing list