V
V
Volodar Znatsky2017-04-21 16:09:20
linux
Volodar Znatsky, 2017-04-21 16:09:20

How to detect connected USB drives in Linux using Java?

It is necessary that the program, after starting the device, search for connected USB drives, and if there is a corresponding file on it, open it. The question is, how to determine the names of connected flash drives in Linux?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Myvrenik, 2017-04-21
@ja8mraz

Look towards the usb4java library . The site has an example of obtaining a list of USB devices.

A
aol-nnov, 2017-04-21
@aol-nnov

execute the blkid command and parse the result, for example. 100500 options though :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question