what is your 10 common linux commands?

October 27th, 2007 mysurface

Dear command line ninjas, Mr CLI and keyboard pianist: What is your regular command you use? I am sure you must thinking of ls and cd. Yeah, they are common for every users, but how about the rest of them? I have construct a combos of commands to help you identify your top ten linux [...]

Posted in awk, column, Common, grep, head, history, nl, sort | Hits: 88148 | 37 Comments »

CLI magic: programable bash completion

May 4th, 2007 mysurface

Ubuntu, a Linux distribution that is getting popular because it has successfully improves it’s user friendliness with simple User interface. You can install any applications with few clicks, configuration under GUI dialogs etc. People usually have the thinking of maybe one day, Ubuntu will become another new operating system like Microsoft Windows. Never! The concept [...]

Posted in apt-cache, apt-get, Bash, complete, pipeline, sort, svn | Hits: 94875 | 10 Comments »

Sort grep -c results

April 17th, 2007 toydi

grep -c “TODO:” *.c foo.c:1 bar.c:0 spam.c:44 egg.c:32 matrix.c:0 grep -c displays the total count of matching lines for each input file, just like above. Now, to sort the results by total count: grep -c “TODO:” *.c | sort -nt: -k2 bar.c:0 matrix.c:0 foo.c:1 egg.c:32 spam.c:44 It sorts the list by total count or the [...]

Posted in grep, sort, Text Manipulation | Hits: 67144 | 1 Comment »

Uniq and basic set theory

October 25th, 2006 toydi

Imagine that I have two files: aquatic – contains a list of aquatic animals starfish whale nemo crab dolphin mammal – contains a list of mammals whale RMS batman dolphin scooby-doo Given aquatic and mammal are two different sets, let’s use sort and uniq to play with a few basic set theory operations: Union ( [...]

Posted in sort, Text Manipulation, uniq | Hits: 26836 | 1 Comment »