convenience.
Useful in scripts while you just need an IP address in a variable. Show Sample Output
Parses tektronic given csv files for both channel 1 and channel 2 and joins them together. Can be easily used by gnuplot after that.
This command will list a CSV list of infected files detected by clamav through squidclamav redirector.
works the same as R's t()
This command shows if there are any locked AFS volumes. The output is a list of AFS volume IDs (or nothing if there are none locked). Show Sample Output
Just type 'opened' and get all files currently opened for edit.
This command will display only the hosts that are active in the network. Show Sample Output
I use this (well I normally just drop the F=*.log bit and put that straight into the awk command) to count how many times I get referred from another site. I know its rough, its to give me an idea where any posts I make are ending up. The reason I do the Q="query" bit is because I often want to check another domain quickly and its quick to use CTRL+A to jump to the start and then CTRL+F to move forward the 3 steps to change the grep query. (I find this easier than moving backwards because if you group a lot of domains with the pipe your command line can get quite messy so its normally easier to have it all at the front so you just have to edit it & hit enter). For people new to the shell it does the following. The Q and F equals bits just make names we can refer to. The awk -F\" '{print $4}' $F reads the file specified by $F and splits it up using double-quotes. It prints out the fourth column for egrep to work on. The 4th column in the log is the referer domain. egrep then matches our query against this list from awk. Finally wc -l gives us the total number of lines (i.e. matches). Show Sample Output
automatically add and remove files in subversion so that you don't have to do it through the annoying svn commands anymore
Really only valuable in a PHP-only project directory. This is using standard linux versions of the tools. On most older BSD variants of sed, use -E instead of -r. Or use: sed 's/\+[[:space:]]\{1,\}//' instead. Show Sample Output
Speaks whatever comes in via stdin (-v pt = portuguese, default = englisg) ..speech part of keyboard event talker. Made to accomplish a simple alarm central based on a cheap keyboard circuit. This way I have one zone per direct keypress. Depends on keypress.sh. It speaks out loud wich zone (key) has been pressed ( faulted ). Here is keypress.sh : #!/bin/bash # keypress.sh: Detect a user keypress ("hot keys"). echo old_tty_settings=$(stty -g) # Save old settings (why?). stty -icanon Keypress=$(head -c1) # or $(dd bs=1 count=1 2> /dev/null) # on non-GNU systems aplay -q /home/mm/bash/beep-1.wav echo echo "Chamada quarto \""$Keypress"\"." echo stty "$old_tty_settings" # Restore old settings. # Thanks, Stephane Chazelas. exit 0
Helpful when we want to do mass file renaming(especially mp3s). Show Sample Output
awk can clear the screen while displaying output. This is a handy way of seeing how many lines a tail -f has hit or see how many files find has found. On solaris, you may have to use 'nawk' and your machine needs 'tput' Show Sample Output
That one works on Linux. On BSD and Solaris, the ifconfig output is much easier to parse:
/sbin/ifconfig -a | awk '/inet/{print $2}'
Useful for analyzing disk usage. If you prefer GUI try http://en.wikipedia.org/wiki/Filelight or http://www.marzocca.net/linux/baobab/ Show Sample Output
Renames all the jpg files as their timestamps with ".jpg" extension. Show Sample Output
You can use that to create a excludefile for nmap, to find hosts, with no DHCP lease in your DHCP range. Show Sample Output
This command will print all fields from the given input to the end of each line, starting with the Nth field.
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: