This command allows you to revert every modified file one-by-one in a while loop, but also after "echo $file;" you can do any sort of processing you might want to add before the revert happens. Show Sample Output
cut -f1,2 - IP range 16 cut -f1,2,3 - IP range 24 cut -f1,2,3,4 - IP range 24 Show Sample Output
This pattern matches empty lines in the file and -c gives the count
You can also use gawk: ps auxww | gawk '/application/' | gawk '/processtobekilled/' | gawk '{print $2}' | grep -v grep | xargs kill -9
more variety
You can execute this inside an editor to get all the fields inside your buffer and do the magic, really usefull when your tables contain a giant list of fields. Show Sample Output
To use this comment you'll have to create a file entitled 'ignorelist' where you put the file name or pattern of the files you want to ignore. I used it for my maven project which generates the child project files in each folder so I can import them into eclipse. By adding these project files to the ignore list ensure they won't appear each time I run 'svn status'. Show Sample Output
In the example suppose we want to move all *.rar files in the current folder to a backupfolder
Extract all href links from an HTML document with sed and grep Show Sample Output
Allows to change 'shell' compatible files execution bit even if their name is not *.sh
My most used bash function without a doubt!
You can substitute 10.10.10.* by your own network. Or whatever nmap accepts, inlcluding submask. Show Sample Output
grep -e "[sh]d[a-l]$" /proc/partitions | awk '{print $4}' # for disks only grep -e "[sh]d[a-l][0-9]\+" /proc/partitions | awk '{print $4}' # for partitions only Show Sample Output
Linux only 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: