Tag Info

Hot answers tagged

6

Device files on Unix systems in general are just one way for user programs to access device drivers; there isn't a one-to-one mapping from devices files to physical hardware, and not all hardware has a device file (or even a device driver). The kernel itself doesn't use device files to interact with hardware. As pointed out by lcd047, network cards don't ...


6

You cannot mmap() /dev/random or /dev/urandom. Nor can you seek() them for that matter. And as a general rule, you cannot mmap() unseekable things. Pipes are another example of things you cannot mmap() because they are not seekable. /dev/random and /dev/urandom are fundamentally stream-based, sequential access, devices. They produce bytes on demand when you ...


2

If your question is actually about restoring a system after a crash, you can safely forget about tar: it has a limit to the maximum length of the paths that is hardcoded in the format specs, and it doesn't handle hardlinks. For similar reasons, you shouldn't try to do backups with cp, pax, cpio, or rsync. A reasonable solution is to use dump / restore, or, ...


1

You can manually create the /dev entry using mknod /dev/ttyUSBn c 188 n Parameters: mknod is widely known tool to create /dev entries /dev/ttyUSBn: device name c : char device 188 : major device number n : minor device number,ttyUSB0, ttyUSB1, etc. But the device should be created automatically according to the udev rules


1

Documentation/devices.txt in the kernel source code documents the allocation process and lists all the allocated device numbers. sd gets a whole bunch of major device numbers because of the large number of devices it can handle: major 8 covers /dev/sda to /dev/sdp, major 65 covers /dev/sdq to /dev/sdaf, 66 /dev/sdag to /dev/sdav and so on all the way to 135 ...


1

I had a similar problem with a USB device using the pl2303 driver. Every now and again /dev/ttyUSB0 would vanish and /dev/ttyUSB1 would appear in its place. I solved it by running a cronjob every 15 minutes that did the following: if [ ! -c /dev/ttyUSB0 ] then echo `date` Device missing echo `date` Stopping zmconcopy `/usr/sbin/rczmconcopy stop ...



Only top voted, non community-wiki answers of a minimum length are eligible