• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I read my usb flash drive content

 
MI Mohammed
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just installed Redhat 9.0 on my system but
the problem, am having right now is reading
the content of my removable flash drive.
Can someone help me pls.


SCJP 1.4 SCJA
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about helping your pls, but in RedHat 9, a USB device presents an MS-DOS FAT filesystem, so you need to check the /var/log/messages file to see what device it brought online and mount it. Typically, this will be /dev/sda1, though some devices might see it simply as /dev/sda.

You have to check the log to be certain, since sda is the most likely device for the drive to appear at, but circumstances may make it show up on sdb, c, d, etc. It will look to Linux like a SCSI device, however.

The recent Fedora releases can detect and mount these devices automatically and (if you're running a GUI desktop, display icons for them). They'll mount as devices under the /media filesystem subtree.
 
Robert Aragon
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flash Drive reading and writing, here is the way I do it.

Find the correct "/dev/sda1" on my machine.

Do this "BEFORE" you plug in your flash.

tail -f /var/log/messages
Plug in your flash drive, and watch for a "/dev/sda1" or "/dev/sda" or
something similar to print out. For example, once you find it, say it is
"/dev/sda1", like on my machine.

Make a directory like: "mkdir /mnt/usbdrive1", then mount the flash on it.
mount /dev/sda1 /mnt/usbdrive1

To view the contents go to "/mnt/usbdrive1" however you want.
When done with the flash, unmount it with "umount /mnt/usbdrive1"

That's it. Let me know what happens O.K.?
 
Saravanan Gujula Mohan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quoted by Tim Holloway
----------------------------------------------------------------------------
I don't know about helping your pls, but in RedHat 9, a USB device presents an MS-DOS FAT filesystem, so you need to check the /var/log/messages file to see what device it brought online and mount it. Typically, this will be /dev/sda1, though some devices might see it simply as /dev/sda .
---------------------------------------------------------------------------

Hi ,
Does that mean that i can't write in my USB flash drive in linux OS ?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by SARAVANAN GM:

Does that mean that i can't write in my USB flash drive in linux OS ?


Not sure where you got this from. As long as you have a read/write driver for the appropriate filesystem type (FAT32, most likely, as given above) then you can mount the drive read/write. If you've got a flash drive formatted as NTFS, well, then it might be a little dodgy!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I don't see much problems in using vfat-filesystems for usb-drives, I don't expect a problem in creating an ext2-filesystem on a flashdrive.

If you exchange data with windows-systems sometimes, vfat will be more easy to access from both systems.
If you never use windows to read/ write the usbdrive, linux-file-attributes (user, group, rwxr-xr-x) are much more comfortable to use on an ext2-filesystem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic