Re: Fwd: /dev/null > /dev/sdb1 !
On Sun, Apr 27, 2008 at 09:46:04AM +0000, Tzafrir Cohen wrote:
> Hi,
>
> Jumping in late, and probably noone still reads this thread, but still,
>
> On Fri, Apr 25, 2008 at 01:21:39AM -0300, Rafael Fontenelle wrote:
>
> > So, I think that the command 'cat /dev/null > /dev/hdd' did nothing to your
> > system. Maybe something else?
>
> /dev/hdd is a block device. 'cat whatever >/dev/hdd' is an operation on
> a character device, essentially.
I do not think character or block device matters.
Upon reading /dev/null, EOF will be encounterd. So nothing is written
to output. For example try:
$ cat /dev/null >here
$ ls -l here
-rw-r--r-- 1 osamu osamu 0 2008-04-27 19:03 here
As long as you use correct device, it will write output. /dev/zero or
/dev/urandom is the good file to use as such input.
$ cat /dev/zero >here
(Control C pressed)
$ ls -l here
-rw-r--r-- 1 osamu osamu 105467904 2008-04-27 19:15 here
Instead of here, you use /dev/sdax etc. I will not try it now :-)
http://people.debian.org/~osamu/pub/getwiki/html/ch02.en.html#specialdevicefiles
I usually use dd to erase this kind of device file. The dummy file
creation is the same.
http://people.debian.org/~osamu/pub/getwiki/html/ch11.en.html#dummyfiles
Osamu
Reply to: