lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How come dd if=/dev/zero of=/nfs/dev/null does not send packets over the network?
On Wed, 2 Jun 2004, Piszcz, Justin Michael wrote:

> root@jpiszcz:~# mkdir /p500/dev
> root@jpiszcz:~# mount 192.168.0.253:/dev /p500/dev
> root@jpiszcz:~# echo blah > /p500/dev/null
> root@jpiszcz:~# ls -l /p500/dev/null
> crw-rw-rw- 1 root sys 1, 3 Jul 17 1994 /p500/dev/null
> root@jpiszcz:~# dd if=/dev/zero of=/p500/dev/null
>
> 6179737+0 records in
> 6179736+0 records out
>
> Instead it treats it as a local block device?
>
> Kernel 2.6.5.
>

First, /dev/null is a device file. Can you access a remote
device over nfs? ... like

mount chaos:/dev/ttyS0 /mnt
cat "foo" >/mnt

I think not. Yes it's the exact same thing; /dev/null is a
character device just like /dev/ttyS0, but a bit dumber.
The above used the network to make the essential equivalent
of a sym-link. The open of the device-file, the connection
of the major-minor numbers to the resulting file descriptor
occurred on your local system.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.051 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site