LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to find the right /dev file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-the-right-dev-file-229056/)

stabu 09-10-2004 03:37 PM

how to find the right /dev file?
 
I keep hitting this problem, because I have no method dealing with it.

I have a USB memory key, which on my own PC comes up as /dev/sda1. I go another PC, load Knoppix, but sda1 is called an invalid block device. OK, I think, just try out the other "usual suspects", /dev/sda, /dev/sdb, etc. No luck.

dmesg tells me a USB mass storage device has been found, but no clues as to which file in /dev. Similarly lsmod tells me, it's there but nothng else.

And there are so many files to choose from in /dev! Which one could it be? IS there any sort of autmated method of sifting through them and finding which one? Or has it always got to be a manual trial and error thing?

ceedeedoos 09-11-2004 04:37 PM

I used to find this by doing

fdisk -l /dev/sd*

if it finds a device with a partition on it, it will list it.

I have no clue whether that's the "correct" way of finding out which device to use, but it still hasn't failed me so far :)

stabu 09-11-2004 07:19 PM

Hey that's pretty cool.

I think most people just hope that conventions are followed and do it by trial and error. May be there is no correct way.

Yours quickens up things a good bit, thanks! Good one!


All times are GMT -5. The time now is 10:09 AM.