Access www.kernel.org and download the last stable linux kernel release. Show Sample Output
Uses urandom and tr to generate a random password. Change the value of head -c## for the lenght of the password. Show Sample Output
This snippet will produce an alpha-numeric 16 character password Show Sample Output
最常使用的10个命令 Show Sample Output
-t, --tuples-only print rows only Show Sample Output
Original command: cat "log" | grep "text to grep" | awk '{print $1}' | sort -n | uniq -c | sort -rn | head -n 100 This is a waste of multiple cats and greps, esp when awk is being used
Accepts multiple files via logs...
. Substitute "text to grep" for your search string.
If you want to alias this, you could do something like this:
alias parse-logs='awk "/$1/{print \$1}" ${@[@]:1} | sort -n | uniq -c | sort -rn | head -n 100'
If you want to see your top ten cpu using processes from the browser (e.g. you don't want to ssh into your server all the time for checking system load) you can run this command and browse to the machines ip on port 8888. For example 192.168.0.100:8888 Show Sample Output
Useful for when you find the system runs out of file descriptors and you want to know why. Show Sample Output
Way more easy to understand for naive user. Just returns the biggest file with size.
Finds the date of the first commit in a git repository branch Show Sample Output
Given a network interface (eth0 in this example), find its ip address, without CIDR netmask. Show Sample Output
If you want to create new user accounts in OS X from the command line use this fragment to find the next free user id. In OS X CLI you have to assign the user id yourself 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: