Couldn't make the other work so I made this
The command will make it easy to determine free IP ranges in a crowded sub-net. Show Sample Output
This command will find the highest context switches on a server and give you the process listing. Show Sample Output
Count on a specific port (80) - FreeBSD friendly. Show Sample Output
Get the current cpu % usage on your system. Show Sample Output
me
Accidentally deleted some file while used by a program ? (Eg: a song)
Use this command to find the file handle and recover using
cp /proc/pid/fd/filehandle /new/recoverd-file.ext
Show Sample Output
Pretty lame to rely on grep and "\->"? Maybe. But it works ;) Show Sample Output
Given a file with the format of 'git log --pretty=short', search in last 100 commits for one with the same description. I used this when after a rebase I had to find out the new commit ids. The second sed replaces all special characters with dots so they don't mess up the grep later on. Show Sample Output
Finds all files recursively from your working directory, matching 'aMethodName', except if 'target' is in that file's path. Handy for finding text without matching all your files in target or subversion directories.
looks at html for "ip" (it's a CSS class), then a little of cut and egrep to get IPv4 address. I use this oneliner into conky. Show Sample Output
Good for when your working on building a clean source install for RPM packaging or what have you. After testing, run this command to compare the original extracted source to your working source directory and it will remove the differences that are created when running './configure' and 'make'.
I have used crontab to run the one-liner and also to run a script containing the one-liner. Neither works. Show Sample Output
This fixes the extra lines you get when you request only 1 paragraph using a little bit of grep. Just set p to the number of paragraphs you want. Show Sample Output
for file in `ls -t \`find . -name "*.zip" -type f\``; do found=`unzip -c "$file" | grep --color=always "PATTERN"`; if [[ $found ]]; then echo -e "${file}\n${found}\n"; fi done
That its my personal key that i dont use, if you want yours, go to imgur and get it, or use that one Show Sample Output
Execute commands serially on a list of hosts. Each ssh connection is made in the background so that if, after five seconds, it hasn't closed, it will be killed and the script will go on to the next system. Maybe there's an easier way to set a timeout in the ssh options...
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: