usb-devices
print USB device details
see also :
lsusb
Synopsis
usb-devices
add an example, a script, a trick and tips
examples
source
addfile /sys/debug/usb/devices
elif type
usb-devices >/dev/null 2>&1; then
# planned (2009/06) to be added in
usbutils
# planned (2009/06) to be added in
usbutils
usb-devices 2>&1 | addinfo usb-devices
elif type lsusb
>/dev/null 2>&1; then
lsusb 2>&1 | addinfo lsusb
description
usb-devices
is a (bash) shell script that can be used to display details
of USB buses in the system and the devices connected to
them.
The output of
the script is similar to the usb/devices file
available either under /proc/bus (if usbfs is
mounted), or under /sys/kernel/debug (if debugfs is
mounted there). The script is primarily intended to be used
if the file is not available.
In contrast to
the usb/devices file, this script only lists
active interfaces (those marked with a "*"
in the usb/devices file) and their endpoints.
Be advised that
there can be differences in the way information is sorted,
as well as in the format of the output.
files
/sys/bus/usb/devices/usb*
The part of the sysfs tree the script walks through to assemble
the printed information.
/proc/bus/usb/devices
Location where the usb/devices file can normally be found
for Linux kernels before 2.6.31, if usbfs is mounted.
/sys/kernel/debug/usb/devices
Location where the usb/devices file can normally be found
for Linux kernel 2.6.31 and later, if debugfs is mounted.
return value
If sysfs is not mounted, a non-zero exit code is returned.
see also
lsusb ,
usbview.
authors
Greg
Kroah-Hartman <greg[:at:]kroah[:dot:]com>
Randy Dunlap
<rdunlap[:at:]xenotime[:dot:]net>
Frans Pop
<elendil[:at:]planet[:dot:]nl>