Carlos A. M. dos Santos
2008-May-21 12:45 UTC
Is it possible to create a directory under /dev?
I attempted this: # mkdir /dev/foo mkdir: /dev/foo: Operation not supported Any suggestions (besides creating it elsewhere, of course)? -- Carlos A. M. dos Santos
On May 21, 2008, at 8:44 AM, Carlos A. M. dos Santos wrote:> I attempted this: > > # mkdir /dev/foo > mkdir: /dev/foo: Operation not supported > > Any suggestions (besides creating it elsewhere, of course)?Assuming you're using a modern FreeBSD (version number would be useful), /dev does not live on a file system. It exists as its own file system, controlled by devfs. Check the man page for devfs for details.
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
Carlos A. M. dos Santos
2008-May-22 03:22 UTC
Is it possible to create a directory under /dev?
On Wed, May 21, 2008 at 2:06 PM, Oliver Fromme <olli@lurza.secnetix.de> wrote:> Carlos A. M. dos Santos <> wrote: > > I attempted this: > > > > # mkdir /dev/foo > > mkdir: /dev/foo: Operation not supported > > DEVFS is a "virtual" filesystem [...]I already knew that. :-)> > 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?I intended to use it as the mount point for a filesystem. -- Carlos A. M. dos Santos