Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [character-special-files]

The tag has no usage guidance.

2
votes
2answers
94 views

What do device type numbers mean?

file /dev/* prints the description of a bunch of files as "block special (M/N)" and "character special (M/N)", where M and N are numbers. For example: $ file /dev/null /dev/null: character special (1/...
9
votes
1answer
352 views

Which Unix-like system really provides the /dev/tcp special file?

I know /dev/tcp/<host>/<port> is a magic path handled specifically by some shells in redirections. But according to man bash: If the operating system on which bash is running provides ...
4
votes
2answers
176 views

Use character device over ssh

I have been looking for a good answer to this question for some time now. I am trying to remotely control a robot with an Xbox controller. The challenge is that the controller is to be connected to ...
0
votes
1answer
78 views

Use /dev/ramX as their corresponding special devices?

With ls -l, I found a series of devices like ram0, ram1 etc. I looked at the output closely and (for example) brw------- 1 root root 1, 3 Jan 6 11:34 /dev/ram3 crw-rw-rw- 1 root root 1, 3 Jul 15 ...
1
vote
1answer
275 views

How do I read USB data from a character device

I need to write a "character device" that reads data from an arduino and writes that data to a log file. I have been searching this subject for hours and I have seen a couple of ways to make this work,...
2
votes
1answer
710 views

How to write to a character special device?

Due to a broken udev setup on a machine from which I'm trying to rescue data (see this post of mine) I'm trying to write to a "character special" device corresponding to a USB flash drive, but am ...
4
votes
2answers
391 views

Character devices for disks on Linux

Why do other UNIX systems need character devices for storage devices when Linux does not? Other UNIX OSes (AIX, HPUX, Solaris and macOS) use something like '/dev/rdisk#' and '/dev/disk#' for storage ...
2
votes
1answer
45 views

Create a file whose content is handled by a program

I want to create a special file, of which the content will be generated upon reading from, and processed upon writing to. There should be a background process handling the file. A pipe is not ...
10
votes
3answers
2k views

Is it possible to expose TCP tunnel in Linux as special character device?

Recently I found in QNX documentation that it allows to set up message based IPC between processes on separate physical machines by using serial device (dev/serX) and it made me wonder: Is it ...
6
votes
1answer
582 views

Is there a difference between u and c in mknod

From man mknod on Linux: c, u create a character (unbuffered) special file Why are there 2 letters for the same function? Is there any subtle difference, or they are completely alike?
5
votes
3answers
871 views

How to tell if a character special file would block if read from

I would like to be able to tell if a character special file would block if a character were read from it without actually reading a character from it. Can this be done?