commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
handles file names with spaces and colons, fixes sort (numeric!), uses mplayer, same output format as other alternatives
Similar but using mediainfo instead of totem-something
Sort .avi movies by time length, print the longest first, and so on...
Figures out what has changed in the last 12 hours.
Change the author to yourself, change the time since to whatever you want.
Sometimes, you don't really care about all the other information that ifconfig spits at you (however useful it may otherwise be). You just want an IP. This strips out all the crap and gives you exactly what you want.
besure to adjust your find to use to correct location of your VMX files.
Sample command to obtain a list of geographic localization for established connections, extracted from netstat. Need geoiplookup command ( part of geoip package under CentOS)
uses the previous "chr" function and uses it to create the inverse function "ord" by brute force.
It's slow, It's inelegant, but it works.
I thought I needed ord/chr to do a cartesian cipher in shell script a whie ago, but eventualy I realized I could get fancy with tr and do the same thing...
Calculates the size on disk for each package installed on the filesystem (or removed but not purged). This is missing the
| sort -rn
which would put the biggest packges on top. That was purposely left out as the command is slightly on the slow side
Also you may need to run this as root as some files can only be checked by du if you can read them ;)
miss a class at UTOSC2010? need a refresher? use this to curl down all the presentations from the UTOSC website. (http://2010.utosc.com) NOTE/WARNING this will dump them in the current directory and there are around 37 and some are big - tested on OSX10.6.1
counts the total (recursive) number of files in the immediate (depth 1) subdirectories as well as the current one and displays them sorted.
Fixed, as per ashawley's comment
usage: sitepass MaStErPaSsWoRd example.com
description: An admittedly excessive amount of hashing, but this will give you a pretty secure password, It also eliminates repeated characters and deletes itself from your command history.
tr '!-~' 'P-~!-O' # this bit is rot47, kinda like rot13 but more nerdy
rev # this avoids the first few bytes of gzip payload, and the magic bytes.
Quick shortcut if you know the hostname and want to save yourself one step for looking up the IP address separately.
show only the name of the apps that are using internet
Not as far off as you thought, now is it?
works on all unices.
If you still connect to your wireless access point manually and need to use wpa_supplicant, the above fu will grep all of the known SSID from your wpa_supplicant.conf file, present it in a Zenity list and return the SSID name you choose. I've wrapped this command in to a bash script that then up's the interface, associates and autenticates. Saves me from using NetworkManager ;)
Based on the MrMerry one, just add some visuals to differentiate files and directories
Based on the MrMerry one, just add some visuals and sort directory and files
Next time you see a mac fanboy bragging about 64-bitness of 10.6 give him this so he might sh?