Requires sysfs mounted on /sys - may only be useful for Linux systems. Could also use "printf '%-8s %s\n' $(basename $f) $(cat $f/address)" instead of echo. Show Sample Output
Requires you to have password free login to remote host ;) Requires xclip and notify-send (If you want to put into clipboard and be notified when action is completed). DATE=$(date +%Y-%m-%d_%H-%M-%S)-$(($(date +%N)/10000000)); HOST="ssh host of your choice"; DEST="destination folder without trailing slash"; URL="URL for file if uploaded to web enabled dir ie. import -window root png:- | ssh $HOST "cat > $DEST/screenshot_$DATE.png"; echo $URL | xclip; notify-send -u low "Screenshot Taken" "Entire screen.\nCopied to clipboard" Show Sample Output
Capitalize first letter of each word in a string. Show Sample Output
same but redirecting to player and putting whaever text line.. works on my ubuntu machine ...
usage: tpb searchterm example: tpb the matrix trilogy This searches for torrents from thepiratebay and displays the top results in reverse order, so the 1st result is at the bottom instead of the top -- which is better for command line users
This is a quick replacement for lspci if you need to know what's in a given system but pciutils is not installed. You then need something that can look up the IDs from pci.ids if you want the verbose output. Show Sample Output
-r recursively -Z zero byte after each file name instead of the usual newline -l only filenames
This will parse a random command json entry from http://commandlinefu.com A must have in your .bash_profile to learn new shell goodies at login!!!
Prints 0's and 1's in The Matrix style. You can easily modify to print 0-9 digits using $RANDOM %10 insted of %2.
The output will show jerk, then wonderful person since echo parses the \b character. Show Sample Output
This one is tried and tested for Ubuntu 12.04. Works great for tailing any file over http.
su www-apache/ftp user and then check readable: find ~/ -type d \( -wholename '/dev/*' -o -wholename '/sys/*' -o -wholename '/proc/*' \) -prune -o -exec test -r {} \; -exec echo {} readable \; 2>/dev/null check writable: find ~/ -type d \( -wholename '/dev/*' -o -wholename '/sys/*' -o -wholename '/proc/*' \) -prune -o -exec test -w {} \; -exec echo {} writable \; 2>/dev/null
use it to add a random boolean switch to your script Show Sample Output
This type of join is clearly documented in the bash manual. Only the first character of IFS is used for the delimiter. Show Sample Output
For mac users ! Show Sample Output
Just run this command and it will printout all the info available about your current distribution and package management system. Show Sample Output
Shows "Bang!" in a chance of 1 out of 6, like in the original game with the gun (spin every round). Otherwise, echoes "Click...". If feeling brave you can also do:
[ $[ $RANDOM % 6 ] == 0 ] && echo 'Bang!' && a really killer command || echo 'Click...'
Show Sample Output
The multiplication table for math study Show Sample Output
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: