A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/105425.html below:

building a large file

building a large file building a large fileSteve Holden sholden at holdenweb.com
Sun Apr 15 11:36:45 EDT 2001
<ben at co.and.co> wrote ...
> Andrew Dalke <dalke at acm.org> wrote:
> > 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.
>
> But $ cat .* * > mylargefile does.
>
Danger, Will Robinson. This will include directories (current and parent, .
and .. respectively) in your match, probably not a good idea. I seem to
remember that the correct pattern should be

$ cat .??* * > mylargefile

but I have no doubt this too will prove to be wrong in some subtle way I
have omitted to consider.

regards
 Steve




More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4