List all MAC addresses on a Linux box. sort -u is useful when having virtual interfaces.
Little faster alternative.
Shows only IP-addresses of ifconfig except 127.0.0.0/8. I fixed the script to work on more systems and configs short info /inet/!d; #grep inet /127.0/d; # grep -v 127.0 /dr:\s/d; # grep -v dr: s/^.*:\(.*\)B.*$/\1/ # remove everything exept between : and B
Liked command 4077 so I improved it, by doing all text manipulation with sed. "Run this as root, it will be helpful to quickly get information about the loaded kernel modules." THX mohan43u Show Sample Output
the f is for file and - stdout, This way little shorter. I Like copy-directory function It does the job but looks like SH**, and this doesn't understand folders with whitespaces and can only handle full path, but otherwise fine, function copy-directory () { ; FrDir="$(echo $1 | sed 's:/: :g' | awk '/ / {print $NF}')" ; SiZe="$(du -sb $1 | awk '{print $1}')" ; (cd $1 ; cd .. ; tar c $FrDir/ )|pv -s $SiZe|(cd $2 ; tar x ) ; } Show Sample Output
shortest alternative without the speed-o-meter"xclip large.xml" "xclip -o" to get the clipboard content, alternatively [shift key] + insert or middle button of your mouse.
Found this one little more for me. This one removes the perl dependency (from command 2535). Source for command : http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/ Show Sample Output
"find . -type d -print0 | xargs -0 chmod 755" thanks masterofdisaster
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.
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
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: