Skip to content
Automatically detect the /dev/sdX name of a hotpluggable device (such as USB). Linux.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
finddev

README.md

Auto Dev Detect

Automatically detects the devname of a hotpluggable device, such as a USB drive. Devnames come of the form /dev/sdX where X is some letter. It denotes where the computer has saved the device in the filesystem, and is sometimes useful to know. Unfortunately it can be difficult to know which devname belongs to which device, which is what this aims to resolve. The user will disconnect and reconnect the device, and Auto Dev Detect will print out something like /dev/sdc, allowing the user to do things with the device's devname.

How to Use

Download the finddev program, and run it from within a bash shell. The following commands might be used to this end:

$ git clone git@github.com:equwal/Auto-Dev-Detect.git
$ ./Auto-Dev-Detect/finddev
OPTIONAL:
$ sudo cp ./Auto-Dev-Detect/finddev /usr/bin #Installs into base path
Now you can do
$ finddev

This installs and executes the Auto-Dev-Detect program. Root privledges are not required. Now that finddev is running, connect or disconnect a hotpluggable device and wait up to two seconds for a response.

Dependencies

Auto Dev Detect requires bash, perl, and the diff command. Most Linux distributions come with these preinstalled.

Additional information

Clonezilla now uses a similar program in their software.

Licensed with MIT free software license.

You can’t perform that action at this time.