>Here's a quick one... What is /dev/zero used for, and what are a few good
>examples?
Here's a couple Makefile rules I used to pad a target file to the right
number of bytes:
# rules to make a LILO-bootable image
%.lilo: %.rom $(LILOPREFIX)
cat $(LILOPREFIX) $< /dev/zero | head -c 64k > $@
%.lzlilo: %.lzrom $(LILOPREFIX)
cat $(LILOPREFIX) $< /dev/zero | head -c 64k > $@
Essentially I'm using it as an inexhaustible source of nul bytes.
I *think* the dynamic loader uses it to null fill memory areas, which is
why removing /dev/zero stops executables that use shared libs from
working.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug