SCIENTIFIC-LINUX-USERS Archives

August 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Kay Diederichs <[log in to unmask]>
Reply To:
Kay Diederichs <[log in to unmask]>
Date:
Mon, 31 Aug 2015 09:51:43 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
>Von: ToddAndMargo <[log in to unmask]>
>Gesendet: Sun Aug 30 07:18:49 MESZ 2015
>Betreff: Re: How do I get flash drive info?
>
>On 08/29/2015 09:45 PM, Brandon Vincent wrote:
>> On Sat, Aug 29, 2015 at 8:14 PM, ToddAndMargo <[log in to unmask]>
>wrote:
>>> I was looking for an easier way to tell if my write protect switches
>>> were in the read only position.  There are other ways, like trying
>to
>>> mount it and see what happens, but I would like to get the
>information
>>> more directly.
>>
>> Try querying the block device with udevadm(8).
>>
>> udevadm info -a -n /dev/sdc
>>
>> Brandon Vincent
>>
>
>Rats!
>
>   looking at device 
>'/devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4.2/2-4.2:1.0/host7/target7:0:0/7:0:0:0/block/sdc':
>     ....
>     ATTR{ro}=="1"

Isn't this the line that tells you what you're looking for?!

Kay
-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

ATOM RSS1 RSS2