CF card and /dev filesystem entries

Brian Candler B.Candler at pobox.com
Mon Nov 21 01:11:54 PST 2005


On Sun, Nov 20, 2005 at 02:11:56PM -1000, Robert Marella wrote:
> > Now, that does the job:
> > 
> > root at billdog brian# dd if=/dev/null of=/dev/da0 count=0
> > 0+0 records in
> > 0+0 records out
> > 0 bytes transferred in 0.000028 secs (0 bytes/sec)
> > root at billdog brian# ls -l /dev/da0*
> > crw-r-----  1 root  operator    0, 107 Nov 20 21:00 /dev/da0
> > crw-r-----  1 root  operator    0, 115 Nov 20 21:00 /dev/da0s1
> > root at billdog brian# 
> > 
> > However, I'm not sure I actually *like* opening my CF card in such a
> > way that I would be likely to overwrite the partition table if I hit
> > a wrong key...
> > 
> > Regards,
> > 
> > Brian.
> >
> I am not sure if this is any different but when placing or changing a
> card in my card reader I run " cat /dev/null > /dev/daX" before
> mounting. I have cards of different sizes and it would fail to mount a
> different size card without doing the above first.

Yeah, that's the same thing: open the device for write and then close it
again. I still wouldn't be happy that in a haze I might type
  cat /dev/zero >/dev/daX
instead of
  cat /dev/null >/dev/daX
but I guess I can write a script.

Regards,

Brian.


More information about the freebsd-stable mailing list