Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!nrl-cmf!cmcl2!beta!unm-la!unmvax!sandia!marms From: marms@sandia.UUCP (Mike Arms) Newsgroups: comp.binaries.ibm.pc Subject: Re: Thanks, I'd rather do it myself Message-ID: <254@sandia.UUCP> Date: 8 Apr 88 00:30:33 GMT References: <2237@ttidca.TTI.COM> Reply-To: marms@sandia.UUCP (Mike Arms) Organization: The Dark Gnat Returns Lines: 23 Keywords: self extracting arc Summary: could use "dd", but slow In article <2237@ttidca.TTI.COM> clark@ttidca.TTI.COM (Ralph Clark) writes: >Here is a simple program to convert a self-extracting archive back into >a regular you-can-run-arc--t-on-it-before-you-spend-an-hour-downloading-it >archive. Inquiry to three local gurus failed to produce a simple one-line >shell command alternative. It will undoubtedly fail if you ask it to delete >a googolplex of bytes from the head of a file. There is indeed a fairly simple one-line Unix command to do exactly this using "dd", but it is VERY slow compared to your C-program. You must specify the block size and the skip option to "dd": dd bs=1 skip=9758 sky.arc On my Sun 3/60, I ran a time comparison just for grins. The "dd" took 4.5 minutes, while "lobotomy" only took 1 second. They produced exactly the same output. Most likely "dd" would move a hell of a lot faster if it wasn't bogged down with a 1 byte block size specifier. Thanks for a simple, but useful solution to the self-extracting arcs problem. -- Mike Arms uucp: ...{ucbvax | gatech}!unmvax!sandia!marms