A system administrator is using the ls -l command to inspect files in the /dev directory and receives the following output for two specific device files:
brw-rw----. 1 root disk 8, 0 Aug 1 10:00 /dev/sdacrw-rw-rw-. 1 root tty 4, 64 Aug 1 10:00 /dev/ttyS0
Based on this output, which statement correctly identifies the device types?
Both /dev/sda and /dev/ttyS0 are character devices.
/dev/sda is a character device, and /dev/ttyS0 is a block device.
/dev/sda is a block device, and /dev/ttyS0 is a character device.
The correct answer is that /dev/sda is a block device, and /dev/ttyS0 is a character device. The first character of the output from ls -l indicates the file type. A 'b' signifies a block device, which handles data in large, fixed-size blocks. Hard drives, such as /dev/sda, are common examples of block devices. A 'c' signifies a character device, which handles data one character or byte at a time. Terminals and serial ports, like /dev/ttyS0, are examples of character devices. The other options incorrectly classify one or both of these device types.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a block device in Linux?
Open an interactive chat with Bash
What is a character device in Linux?
Open an interactive chat with Bash
How can you identify device types using `ls -l`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access