Questions tagged [devices]

devices refers to questions about the Unix/Linux device special files, normally these are under /dev. Do not use this tag for physical devices (for that use e.g. usb or pci).

A device under Unix/Linux is a file, normally located in directory structure under /dev. These special files are not located on the filesystem, but handled by device specific device drivers.

Do not use this tag to indicate physical device such as USB Bluetooth dongle (, ) or PCI devices ()

845 questions
61
votes
1 answer

Difference between /dev/null and /dev/zero

When trying to redirect to /dev/null and /dev/zero, the output it is discarded. It seems both /dev/null and /dev/zero accept and discard all input. So, what is the difference between /dev/null and /dev/zero?
Pandya
  • 24,618
23
votes
8 answers

How can I put a bit mask on /dev/zero so that I can get bytes other than zero?

How can I put a bit mask on /dev/zero so that I can have a source not only for 0x00 but also for any byte between 0x01 and 0xFF?
6
votes
1 answer

Why does the UNIX system need so many [0-byte] drives at /dev/*

So I recently asked this question, which lead me to run this command: $ du -sk /dev/* Which outputs about 353 different entries that look like this: 0 /dev/sdt 0 /dev/stderr 0 /dev/stdin 0 /dev/stdout 0 /dev/systrace 0 /dev/tty 0 …
Ichigo Kurosaki
  • 103
  • 1
  • 8
5
votes
2 answers

How do I recreate /dev/ttyUSB## devices that I deleted?

Background It seems I only know enough linux to get myself in trouble. I'm working on a couple of embedded systems (two different models) both running linux. I've been troubleshooting a modem support code that I had working with the newer one of the…
Jon
  • 165
  • 1
  • 8
4
votes
1 answer

/dev directory; characteristic device files: network_latency, network_throughput

I'm using some networking devices for car to car communication which runs on Linux 3.10.17 OS. With those devices I've to measure the overall network throughput and latency. Inside the /dev directory, I've found two characteristic device files named…
3
votes
3 answers

How can I disable an input device?

I have a broken laptop built-in keyboard (The shift-button sometimes gets stuck down). I exclusively use an external keyboard, but the internal keyboard interferes with it. (I can not unplug the device.) I can disable with xinput, but it becomes…
3
votes
1 answer

What is the command that lists all the peripheral devices connected to the computer in xubuntu?

I need to know what is the command that lists all the pheripheral devices connected to the computer, I already used this command but I really don't remember its name.
1
vote
2 answers

Printing out the contents of /dev/nvme devices : what does it represent?

Out of curiosity I've decided to call cat on one of my nvme devices with the following command : sudo cat /dev/nvme0n1p1 It started printing out gibberish but now I wonder : what data does this actually represent ? Is it data from somewhere on the…
Telno
  • 13
1
vote
1 answer

remove /dev/mapper/fedora-root and /dev/mapper/fedora-swap

I want to replace Fedora 18 with Ubuntu but I have these devices listed when partitioning. I only have a hard disk labelled sda, where does these virtual device come from? How I do remove them?
hgajshb
  • 3,865
  • 4
  • 19
  • 18
1
vote
1 answer

DoS: how to limit access to /dev/random?

One of my users likes to cat /dev/random > /dev/null. This has caused issues with other processes performing poorly because they're blocked waiting for entropy. Is there a way of preventing users from consuming too much randomness? I've tried cat…
1
vote
0 answers

Are the major and minor numbers of a device the same as the device type and subdevice number describe in the Version 7 Unix Manual?

According to a paper in the manual, written by Ken Thompson and Dennis Ritchie: When an I/O request is made to a file whose i-node indicates that it is special, the last 12 device address words are immaterial, and the first specifies an internal…
user628544
  • 1,565
1
vote
0 answers

Suse 10 - Same disk showed as IDE (hda) and SCSI (sda)

I have a strange problem with disk detection. I installed a Suse 10 and I see the same disk (scsi) showed as /dev/hda and /dev/sda. Here the fdisk output: sl0slmkmsd00:~ # fdisk -l /dev/hda Disk /dev/hda: 107.4 GB, 107374182400 bytes 255 heads, 63…
1
vote
1 answer

Does programmer use device files as interface to device drivers in their programs?

In Linux shell, a user can access a device driver, via its device file as the interface. When a Linux C programmer want to access a driver in his C program, does he also access the driver, via its device file as the interface? In other words, is a…
Tim
  • 101,790
0
votes
1 answer

Are device nodes stored as files or just special entries in directories?

My question is related to the way device nodes are implemented in Linux. I know there are pseudo files systems like udev or devtmpfs available - in this case there is no real storage behind and the file system is an illusion presented to…
mrn
  • 149
0
votes
2 answers

What files are being updated or written in /dev/sda?

root@host [/etc]# iostat -xk Linux 2.6.32-279.19.1.el6.x86_64 (host.superhostsite.com) 01/13/2013 _x86_64_ (24 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 12.53 0.19 3.72 0.18 0.00 …
user4951
  • 10,519
1
2