Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2013 21:34:56 +0200
From:      Polytropon <freebsd@edvax.de>
To:        David Newman <dnewman@networktest.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: viewing major and minor device numbers
Message-ID:  <20131025213456.13153587.freebsd@edvax.de>
In-Reply-To: <526AC5E7.3080900@networktest.com>
References:  <526AC5E7.3080900@networktest.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 Oct 2013 12:26:31 -0700, David Newman wrote:
> FreeBSD 9.2-RELEASE, amd64
> 
> To create some character special devices in a chroot environment, I've
> previously used mknod, but now can't find the major and minor device
> numbers.
> 
> The ls manpage says these numbers should be displayed in the size field.
> However, I'm seeing only one hex value, e.g.:
> 
> $ ls -l /dev/null
> crw-rw-rw-  1 root  wheel  0x13 Oct 25 12:22 /dev/null
> 
> So I don't know what major and minor values to feed mknod. Or is there
> another way to do this?

Do you have any "suspicious" ls alias or options preconfigured?
That output looks a bit strange, it should be something like
this (example from a host system, not from inside a jail):

% /bin/ls -laFG /dev/null 
crw-rw-rw-  1 root  wheel    0,  17 Oct 25 21:33 /dev/null
                             ^   ^^

This is the binary /bin/ls, no "shell builtin" or the like,
called from the C shell; OS is FreeBSD 8, x86.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131025213456.13153587.freebsd>