On Tue, 2004-10-19 04:23:46 -0700, Jeba Anandhan A wrote in message <20041019112347.93552.qmail@web50608.mail.yahoo.com>: > i have one USB Flash Disk.when i attached to it,linux > 2.4.20-8 detected it as /dev/sda1.my question,i wish No, it doesn't. It will detect it as /dev/sda and additionally create a partition (/dev/sda1) for it). > to write some raw data and read raw data.it consist > fat filesystem.how to do it.[shall i need to mount the > device in some directory]. Well, it depends on what you actually want: - Raw data in a file inside a partition: Mount the filesystem of the partition somewhere and open() the file - Raw data inside the partition: open() the partition (/dev/sda1 in your case); this'll probably destroy the filesystem that it contains. - Raw data directly on the (unpartitioned) device: open() the device (/dev/sda) and write to it. That will probably kill the partition table as well as the filesystem in this partition. By the way, this isn't really a kernel question, and if it's "urgent", you'd probably ask your boss to send us some $$ for helping you... MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));