Ugly file name

Jonathan I. Kamens jik at athena.mit.edu
Tue May 23 13:26:13 AEST 1989


In article <131 at hydra.ecrcvax.UUCP> johng at hydra.UUCP (John Gregor) writes:
>In article <105096 at sun.Eng.Sun.COM> jackh at sun.UUCP (John Hevelin) writes:
>>   find . -inum 12345 -exec cat {} \; > goodfile
>Am I missing something?  Wouldn't
>
>	find . -inum 12345 -exec mv {} goodfile \;
>
>be a bit more efficient?

Most definitely.... *especially* if the file in question is a sparse
file, such as the type created by dbm.  The former solution will make
"goodfile" actually take up as much space as the original file *said*
(in a directory listing) it was taking up, even if in actuality it was
taking up much less due to the way sparse files are stored.  The
latter solution will not have this problem.

(Copy dbm files over NFS?  Sure, no problem :-)

Jonathan Kamens			              USnail:
MIT Project Athena				410 Memorial Drive, No. 223F
jik at Athena.MIT.EDU				Cambridge, MA 02139-4318
Office: 617-253-4261			      Home: 617-225-8218



More information about the Comp.unix.questions mailing list