See udev at work

udevadm monitor
See how your system works with pendrives/mice/monitors/whatever-you-can-plug-in. Use cases: see on which /dev/... your peripherals are, find out if a specific udev rule is being applied correctly.

20
2010-06-27 00:16:41

These Might Interest You

  • Use `scsi_id` to positively identify which LUNs are which (i.e. compare with the list of LUNs you created on your disk array) (shown: RHEL5 usage) Debian usage: # for i in /dev/sd* ; do wwn=`/lib/udev/scsi_id -g --device $i` ; [ "$wwn" != "" ] && echo -e ${i##*/}'\t'$wwn ;done Show Sample Output


    1
    for i in /sys/block/sd* ; do wwn=`/lib/udev/scsi_id -g -s /block/${i##*/}` ; [ "$wwn" != "" ] && echo -e ${i##*/}'\t'$wwn ;done
    mhs · 2012-09-12 14:14:53 0
  • If you need to hop on a wifi fast, perhaps you're fixing a system and it's read-only this command pipes the output of wpa_passphrase used to generate a .conf file and instead reads it from the standard input stream. The -i switch for interface may not be wlan0, as udev will change it. A quick "ifconfig" or "dmesg | grep wlan0" will show you the wireless interface name.


    0
    wpa_passphrase "ESSID" "Password" | wpa_supplicant -Dwext -iwlan0 -c/dev/stdin&
    adamrights · 2013-05-07 11:05:50 0
  • This will create a new directory called MyProject with a pom.xml and the following tree structure: MyProject |-->pom.xml |-->src | |-->main | | |-->java | | | |-->my | | | | |-->work | | | | | |-->App.java | |-->test | | |-->java | | | |-->my | | | | |-->work | | | | | |-->AppTest.java


    -5
    mvn archetype:create -DgroupId=my.work -DartifactId=MyProject
    sharfah · 2009-05-20 12:53:23 0
  • Might not work if your devices is older than Lollipop (5.0). Verified on macOS, and most likely work on Linux as well.


    0
    adb exec-out screencap -p > screenshot.png
    solamour · 2017-12-27 02:48:07 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: