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:
To sort the list by file/directory size, insert `sort -n |` before `awk`.
This command give you Just the Network Cidr Notation
This will find all the -Xmx[BIGINT] running on a system, add them up for you and give you the total.
Solves these pesky errors you see in the Apache log:
[Fri Jun 28 17:51:00 2013] [emerg] (28)No space left on device: Couldn't create accept lock (/monsoon/opt/apache2/logs/accept.lock.356) (5)
Naturally, can be used to get rid of other semaphores. Note: change the apache user in accordance to your ENV.
..not guaranteed to always be accurate but fun to see how old you Linux installation is based on the root partitions file system creation date.
List system current active ip address
becuase im lazy and cant be bothered looking at the tv guide to choose a channel , any improvments or comments appreciated
Is the better option on a Open SuSE Box
pretty much the same.
I use awk rather than grep and perl.
It looks like the URL has been updated.
The service tag can also be retrieved via snmp - potential for a for loop over a list of servers. I might have a look into doing an example.
Automatically drops mount points that have non-numeric sizes (e.g. /proc). Tested in bash on Linux and AIX.
This will strip out the relivent disk information from kvm. I'm using it to find disks on a SAN which are no longer in use.
The other commands were good, but they included packages that were installed and then removed.
This command only shows packages that are currently installed, sorts smallest to largest, and formats the sizes to be human readable.
find the uptime and convert in minutes, works with AIX and Linux too
dumpfile is a CSV file, which its 1st field is a phone number in format CC+10 digits
Empty lines are deleted, before the output in format "prefix,ocurrences"