Tag Info

New answers tagged

1

For me it was the baudrate too low. Output did appear once I reconfigured the system (device and port) to use 300 instead of 150.


0

In addition to the items mentioned above, a driver or other program can cache data from a device. On a read-write device, such as a hard disk or thumb drive, data written to the device may not have been written yet. Journaling file systems can also require flushing the journal before it doesn't see the device anymore. Then you've got filesystems that overlay ...


3

Your shell, or whatever process was in the foreground, was already reading the terminal to which is was attached, which was /dev/ttys011. Then you started another process, a cat also reading the same terminal at the same time. Now there are two processes competing for the same input from the terminal. Each time you type a key in the terminal, it is ...


0

lsof <your devices> to show the processes that use your device. or strace -p pid to trace a process that you know is supposed to use your device.


0

I think lsof is the tool that should be used for. It will list all the files that are being used by a process. May be fuser can also be used if you want do not know the process id.


1

The question title asks: Why do we need to mount on Linux? One way to interpret this question: Why do we need to issue explicit mount commands to make file systems available on Linux? The answer: we don't. You don't need to mount file systems explicitly, you can arrange for it to be done automatically, and Linux distributions already do this for most ...


1

AFAIK device files are the only option for userland processes to get access to devices. The kernel doesn't care whether that process is a shell. C programs have an option for fine-tuning the device access: the ioctl call: man 2 ioctl: int ioctl(int d, unsigned long request, ...); Maybe there is a shell wrapper for that but I am not aware of any. > ...


0

It does so because there is, with many media for desktop and laptop UIs, ambiguity about what to do when the media is inserted, because user intuition is that inserting the disk in the physical box with which the user interacts is not different to, say, inserting it into a device next to the computer that has a network connection. Thus in the fundamental ...


1

Because /dev/cdrom is a device, whereas /media/cdrom is a filesystem. You need to mount the former on the latter in order to access the files on the CD-ROM. Your operating system is already automatically mounting the root and user filesystems from your physical hard disk device, when you boot your computer. This is just adding more filesystems to use. All ...


3

I think about this in the following manner: mount is a tool that tells the system to interpret the contents of some files as directory trees. The filesystem has directories and files, and each file is a label for some string of bytes. /dev/cdrom is a file, it represents the string of bytes stored on the CD. You can read this very long string directly, but ...


3

I'd call it historical reasons. Not that the other answers are wrong, but there's a bit more to the story. Compare Windows: Windows started as a single-computer, single-user OS. That single computer probably had one floppy drive and one hard drive, no network connection, no USB, no nothing. (Windows 3.11 had native networking capabilities; Windows 3.1 ...


3

Many database engines can work directly with raw disks or partitions. For example, MySQL: http://dev.mysql.com/doc/refman/5.7/en/innodb-raw-devices.html This avoids the overhead of going through filesystem drivers, when all the DB engine really needs is one huge file that fills the disk.


12

Basically, and to put it easily, the operating system needs to know how to access the files on that device. mount is not only "giving you access to the files", it's telling the OS the filesystem the drive has, if it's read only or read/write access, etc. /dev/cdrom is a low-level device, the operating system functions wouldn't know how to access them... ...


6

For consistency Imagine you have some partitions on the first hard drive in your system. For example, /dev/sda2. You later decide that the drive isn't large enough so you purchase a second one and add it to the system. All of a sudden, that becomes /dev/sda and your current drive becomes /dev/sdb. Your partition is now /dev/sdb2. Using your proposed ...


5

There are several advantages to the current arrangement. They can be grouped into advantages of block special files and advantages of mountpoints. Special files are files that represent devices. One of the Ideas that unix was built on is everything is a file. This makes many things simple, for example user interaction is just file reads and writes on a tty ...


46

One reason is that block level access is a bit lower level than ls would be able to work with. /dev/cdrom, or dev/sda1 may be your CD ROM drive and partition 1 of your hard drive, respectively, but they aren't implementing ISO 9660 / ext4 - they're just RAW pointers to those devices known as Device Files. One of the things mount determines is HOW to use ...


1

If you do: mount -t type /dev/somedev /dir/somedir you mount the device file somedev on the directory somedir. somedir is and stays a directory, the access to the device "redirects" via the mount point to the somedev device. To answer your second question ( have corresponding device file somewhere) directly: yes it does it is somedev that you use for ...


2

The /sys filesystem (sysfs) contains files that provide information about devices: whether it's powered on, the vendor name and model, what bus the device is plugged into, etc. It's of interest to applications that manage devices. The /dev filesystem contains files that allow programs to access the devices themselves: write data to a serial port, read a ...


1

Don't worry - it's always empty, and the data doesn't seem to be going anywhere important. Just in case you ever run into this problem with a real drive, the best program for this kind of work (recovering entire deleted partitions) is called TestDisk, by Chrstophe Grenier. You can download it here.


1

Did you notice any malfunction on the system after dd'ing your img file to sdt? If not - I assume you're save. /dev/sdXYZ usually are storage lun representing files. sdt might be Undocumented because of the same reason as sdx, sdfa or sdlg - they are not attached by default. I see Minor and Major numbers of the file are both zero so if it's indeed a storage ...


3

I was surprised to discover that my Mac Book Air does have a /dev/sdt character special device. Since I could not fathom its nature, I looked up my copy of Mac OS X for Unix Geeks. At page 60, there is the list of all entries in /dev. sdt is indeed mentioned, with the unenlightening explanation: sdt Undocumented It is its only mention in ...


14

They're device nodes: In Unix-like operating systems, a device file or special file is an interface for a device driver that appears in a file system as if it were an ordinary file. [...] They allow software to interact with a device driver using standard input/output system calls, which simplifies many tasks and unifies user-space I/O ...



Top 50 recent answers are included