Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sciuriware

macrumors 6502a
Original poster
Jan 4, 2014
769
165
Gelderland
Hello all,
after I umount/eject a USB disk or stick, I can no longer see it.
However I would like to check if somebody has physically disconnected the device
by taking it out or disconnecting the cable.
I found that DiskUtility can 'see' such devices.
Is there any way, e.g. from a shell command, to detect their presence?
Thanks in advance.
;JOOP!
 
You could always try a diskutil list command to see if it shows up there. I am thinking if it lists the device in the gui not mounted as I have seen before it most likely will on the command line as well, never tried it so not positive on this though.
 
You could always try a diskutil list command to see if it shows up there. I am thinking if it lists the device in the gui not mounted as I have seen before it most likely will on the command line as well, never tried it so not positive on this though.
That's a good suggestion.
Only a bit clumsy to filter the info identifying the drive among all others.
Btw.: I program in JAVA and it's no problem to spawn the diskutil command and catch its output.
;JOOP!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.