Movatterモバイル変換


[0]ホーム

URL:


building a large file

Steve Holdensholden 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 toremember that the correct pattern should be$ cat .??* * > mylargefilebut I have no doubt this too will prove to be wrong in some subtle way Ihave omitted to consider.regards Steve


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp