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).

learn more… | top users | synonyms (1)

2
votes
1answer
10 views

Redirect or trigger on dev node input event

Is it possible to trigger an event when data is available at a dev node? Very simply, if some widget device sends information over usb to my linux box, would it be possible to trap into some event ...
2
votes
1answer
29 views

How can I give a user the CAP_MKNOD capabillity?

Following on from this question: rsync's relationship with special files In order to back up device files, rsync at the destination needs to be able to call mknod. The usual approach would be to ...
3
votes
1answer
15 views

rsync's relationship with special files

I'm trying to transfer some existing backups from one system to another. The older backup system seems to have managed to back up special files like /dev/hda, /dev/tty0, and /dev/null which look like ...
15
votes
7answers
2k views

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?
3
votes
2answers
36 views

How to skip special / socket files during rsync transfer?

Using the following command. rsync --archive --delete --partial --progress --recursive --no-links --no-devices --quiet source target Using --no-links and --no-devices already. Getting the error ...
1
vote
1answer
43 views

What are some common use cases for creating block/character device files from the shell with mknod?

I understand that block/character device files are created programmatically (by the drivers themselves?) to facilitate communications with device drivers using standard I/O calls. But why one would ...
2
votes
1answer
44 views

Changing the /dev/tty* permissions at startup

My solution (ArchLinux ARM on RaspberryPi) requires that a non-privileged user has to have access to the /dev/ttyAMA0 port. In final implementation that user will be automatically logged in and a ...
4
votes
1answer
45 views

why isn't monitor listed under /dev in linux?

If /dev is suppose to list all the devices that is connected, like usb, hdd, webcam, how come on my ubuntu 15 VM I don't see a monitor? I am running the desktop edition so there should be a monitor. ...
0
votes
0answers
25 views

Platform Device Drivers

I was just going through the code of kernel. I have a raspberry Pi board. I want to interface the touch screen with my board. I want to develop the Platform driver for that. As per the documentation ...
0
votes
0answers
5 views

Discrepancy in Owncloud drive size

I have ownCloud running on Debian Raspberry Pi with an 8Gb USB as the drive. Checking the USB is mounted correctly: df -h /dev/sda1 7.3G 20M 6.9G 1% /media/owncloud But my ownCloud Mac ...
3
votes
1answer
39 views

How do I check if sound card is in use and, if possible, which process is using it?

I want to know if a program is using my sound card without my knowledge. I thought about building a program that uses low-level device driver code to do the trick, but am now interested in seeing if I ...
2
votes
2answers
48 views

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 ...
1
vote
1answer
49 views

How to associate physical usb port with usb device number

I'm using Ubuntu 12.04. I need to send a command to a device that I have connected on a port of my PC. I can send the command by finding out what the Bus and Device number are. For example, lsusb ...
2
votes
1answer
77 views

mmap /dev/random

Why is it that I cannot mmap /dev/random or /dev/urandom on Linux? I get errno 19 which is ENODEV. When I try the same code with /dev/zero it works. int fd = open(path, O_RDONLY); assert ...
1
vote
0answers
27 views

Playing sound through /dev/dsp?

I have a USB soundcard attached to my Raspberry Pi. I used the command: sudo modprobe snd_pcm_oss which created /dev/dsp and /dev/dsp1. /dsp corresponds to the internal soundcard whereas /dsp1 ...
0
votes
1answer
69 views

Lvreduce online on RHEL 6 or centos 6 with ext4 file systems

Is it possible to reduce a mounting lv safely at RHEL6/CentOS6 with ext4 file system? If it is, how can I do that?
1
vote
1answer
29 views

OSX: MBP: How does system detect sd card inserted?

I have a MacBookPro running Mavericks. I can insert one sd card into the slot and it mounts just fine. Another sd card I slip in and nothing happens. It does not appear in disk utility. It does ...
6
votes
2answers
61 views

Can a linux filesystem be backed up by copying the file structure tree only?

This might be considered to be more of an academic question but here goes. Returning to Linux after some years away, I installed Ubuntu 15.04 Desktop on a small PC. Looking around the file system ...
0
votes
1answer
48 views

How to get a list of major number -> driver associations

http://www.nostarch.com/tlpi states: "Each device driver registers its association with a specific major device ID, and this association provides the connection between the device special file and the ...
1
vote
0answers
83 views

USB bar code scanner not working on Raspbian

My USB bar code scanner (SYMBOL LS2208) is recognized as a HID. hid-generic 0003:05E0:0600.000F: hiddev0,hidraw0: USB HID v1.10 Device [\xffffffef\xffffffbe\xffffffa9\xffffffbe\xffffffa9Symbol ...
1
vote
1answer
152 views

LVM unknown device: how to recover?

I have a server with two hard drives that I thought I had correctly installed with LVM, until I discovered that the second hard-drive did not actually seem to be used. I investigated the problem and ...
2
votes
1answer
43 views

Why can X11 access the video card?

This one is maybe a bit theoretical, but... How the heck can X11 touch the video hardware? As I understand it, X11 is an unprivileged user-mode program. But only kernel-mode software can access the ...
1
vote
0answers
34 views

FreeBSD: Permanent nodes for usb devices

In FreeBSD, USB devices appear in /dev as (for example) /dev/ugen2.5, /dev/ugen2.6, etc... However, I noticed after a reboot sometimes these are pointing to different devices. Is there a way to lock ...
2
votes
0answers
37 views

Why reading from and writing to framebuffer shows no effect ?

I read a very short description of how to make a Screenshot by making use of the file which represents the framebuffer /dev/fb0. in order to write the screen content: cat /dev/fb0 > file in ...
4
votes
2answers
609 views

Using bash's `/dev/udp`, how would I know if the port was open?

I do not have access to netcat or nmap so I'm trying to use bash and the /dev/udp/ special files to test ports. I could do something like: echo "" > /dev/udp/example.com/8000 But $? is always 0 ...
1
vote
1answer
53 views

Can you scp a device file?

My flash is partitioned as /dev/mtd0 /dev/mtd1 etc....And I want to scp one of the partitions over to my pc so I can analyze it with a hex editor, but everytime I try to copy it with scp I get -not a ...
0
votes
1answer
46 views

Sunix Low Level Parallel port driver not working

Background: I am currently in the process of updating a Industrial PC + software from Debian 4 (etch) to Debian 7 (Wheezy) due to hardware obsolescence, one of the few pieces of hardware being shared ...
2
votes
1answer
197 views

Why is “nodev” in /etc/fstab so important? How can character devices be used for hacking?

I am learning about linux security and struggling to understand why a USB stick with a character device on it is potentially dangerous. If I have a USB stick with a bash executable that has setuid ...
1
vote
0answers
49 views

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 ...
1
vote
0answers
80 views

Bluetooth keyboard not showing up in /dev/input

I've just installed an Apple Wireless keyboard on a Debian system. I used this guide and only console tools — no X on that machine yet. The keyboard works fine. Now I want to remap a right Cmd key ...
0
votes
0answers
95 views

No USB flash drive / dev / Galileo Intel Gen2

I have intel Galileo Gen2 and Debina installed on it from here: http://sourceforge.net/p/galileodebian/wiki/Home/ And I also have a problem with that, it does not appear in the / dev / any of the usb ...
-1
votes
1answer
32 views

Which of the following is a Linux representation of a physical USB device?

I'm trying to figure out which of these could be a physical USB device: /dev/hda /dev/hda1 /dev/bin /dev/sda /dev/sda2 What's the difference between hda and sda? Between hda and hda1? Which could ...
0
votes
1answer
46 views

Debian Fresh Install: IO_Page_Fault

I recently tried to install Debian alongside the mint installation I am using to type this. However, I keep getting this strange error whenever I try to boot it, even after a fresh install ...
2
votes
0answers
38 views

How to temporarily disable mouse device?

I have wireless USB keyboard and mouse combo. I need a way to disable mouse while leaving keyboard function working and a way to enable it again after some time. I don't use X and I can't make it in ...
1
vote
0answers
47 views

Pipe a device via USB or wlan

I have an Android phone and I want to use some of its onboard device from PC. To be more clear, there is a node in /dev/ and I want to have on PC a file (or named pipe which is accessable as a file) ...
0
votes
1answer
34 views

How to figure out primary/secondary IDE channel via sysfs (if possible)

Though I've got quite a good basic understanding of sysfs meanwhile, there are still things I cannot solve on my own. For a starter, I'd like to figure out via sysfs (later by scripting of course) ...
1
vote
1answer
100 views

Run Out Of Space On /dev/sda2

My Linux (Mint 13) laptop reported that 'The volume "Fiilesystem root" has only 0 bytes disk space remaining'. When I ran a 'df' I got the following result:- HP-255-G1-Notebook-PC # df Filesystem ...
4
votes
1answer
367 views

Why did sshd delete my /dev/zero?

When I do lsof +c 0 | grep /dev/zero, I see the following two lines: sshd 19064 root DEL REG 0,4 497862 /dev/zero sshd 19064 root DEL REG 0,4 498725 /dev/zero ...
0
votes
0answers
26 views

Detecting and categorizing device drivers in a running system

How can I obtain what device drivers are incorporated in a running kernel? More than this, how can I categorize these device drivers? For instance, this is a Linux kernel conceptual map, from ...
0
votes
1answer
168 views

RHEL7: Why does 'nmcli conn show' & 'ip addr show' display different connections?

My 'nmcli conn show' & /'etc/sysconfig/network-scripts' config files don't match up, showing just one connection/devices of each: [root@ciroc network-scripts]# ls |grep ifcfg ifcfg-enp0s3 ...
2
votes
1answer
57 views

execute chmod on boot time on headless debian

I am programming a (web based) POS system, dedicated to be running on a debian based ITX-server with apache2 etc. Currently I am using Lubuntu 14.04 LTS for development (and for the 1st customer) with ...
1
vote
2answers
44 views

Creating a device similar to /dev/random from a script

I am writing a program for which I will create a script to generate test data in a specific format. How can I create a /dev/myprogram device that would work similar to /dev/random (preferably in ...
1
vote
1answer
26 views

Pushing changes to driver repos

My understanding of dkms is that its a way to dynamically manage all connected/disconnected device drivers on a Linux system. If that's correct, then I have to imagine that it allows you to configure ...
1
vote
1answer
57 views

Why does tapping a TTY device only capture every other character?

So, I came across the ttyname function (unistd.h) and had to test it out. #include <unistd.h> #include <stdio.h> int main(void) { printf("%s\n", ttyname(0)); return 0; } On my ...
0
votes
2answers
30 views

how to know which device was open

is there any shell command, can let me know, current open device or device already in operation. For example, I use minicom to open a device /dev/ttyUSB0 or /dev/ttyS0, after I use program open this ...
1
vote
1answer
30 views

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 ...
41
votes
9answers
5k views

Why do we need to mount on Linux?

I understand what mounting is in Linux, and I understand device files. However I do not understand WHY we need to mount. For example, as explained in the accepted answer of this question, using this ...
1
vote
0answers
122 views

Raspbian: USB storage device name changing after USB device power cycle

I'm running Raspbian 7.4 on a Raspberry PI that has two USB storage devices connected to it. This Raspberry PI will remain running during a power failure because it has console cable connected to it ...
1
vote
1answer
28 views

Is the directory that a file-system is mounted on (mount point) a device file of the file system's type?

A device file is an interface to the device driver of the device. When we mount a file system to a directory, is the directory considered a device file (of the file system's type)? If the ...
0
votes
0answers
55 views

Pegasus R6 Thunderbolt raid with CentOS 6.5

We have ourselves a rather expensive Mac Pegasus R6 external thunderbolt raid and a CentOS box that we would love to use it. On a Mac it's plug and play, however on our CentOS box it's not recognized ...