LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-29-2006, 08:05 PM   #1
quartslove
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Difference between Block device and Character device


Anyone can show me the difference between Block devive and Character device. And how can work with them (use in which situations) ?
 
Old 11-29-2006, 08:34 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
A block device would read/write bytes in fixed size blocks, as in disk sectors. Character devices read/write 0 or more bytes, in a stream, such as a TTY or a keyboard. The nature of the device generally dictates how the device driver is written for it, and you access the device accordingly. Mostly, when accessing devices, you treat then as if they are files: open-read-write-seek-flush-stat-close. You also have ioctl calls to access the device itself (as opposed to the data that it conveys).

--- rod.
 
Old 11-29-2006, 08:50 PM   #3
quartslove
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Thankyou, TheNbomr.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Block device /dev/sda3 is not a valid root device.. rincewind Linux - Hardware 7 06-09-2006 04:47 AM
Character Device driver: How to load it automatically ? shendeswanand Linux - Software 0 02-09-2006 09:59 PM
Character device driver calsoft_pg Linux - Software 0 01-03-2006 12:17 PM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM
How to change character device file name? taphos Linux - General 2 03-28-2004 08:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration