Is it possible to create a directory under /dev?

Oliver Fromme olli at lurza.secnetix.de
Wed May 21 17:06:04 UTC 2008


Carlos A. M. dos Santos <> wrote:
 > I attempted this:
 > 
 >      # mkdir /dev/foo
 >      mkdir: /dev/foo: Operation not supported

DEVFS is a "virtual" filesystem, i.e. its contents are not
stored on disk, but they're dunamically created by the
kernel.  Subdirectories only come into existence when a
driver creates one for its own purposes, e.g. gmirror
creates a /dev/mirror directory.

 > Any suggestions (besides creating it elsewhere, of course)?

That depends on the purpose.  *Why* do you want to create
a subdirectory in /dev?  What do you want to do with it?

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

$ dd if=/dev/urandom of=test.pl count=1
$ file test.pl
test.pl: perl script text executable


More information about the freebsd-stable mailing list