[kwlug-disc] top 10 command line commands

Chris Frey cdfrey at foursquare.net
Tue Dec 15 14:22:11 EST 2009


Some useful ones in my world:

diff -ruN olddir newdir

	Create a diff on two directories

vi -o filename.{h,cc}

	Open both the header and source file in vim's window mode

ctags -R -f ~/tags-global --tag-relative=yes
  and in my .vimrc file:
set tags=./tags,./TAGS,tags,TAGS,/home/cdfrey/tags-global

	Put ctags of multiple sources in one global file, which makes it
	easy to g-Ctrl-] and jump between multiple projects in source code.

git add -u

	Add only the modified files for a new commit.

git add -p

	Add files for a new commit, but present each change in diff format
	for confirmation.

jobs -l

	Show current running jobs, along with the process group number.
	This makes it easy to use 'renice' on a whole group.

ssh -Y -a -2 user at host

	Forward X connection, run remote X programs.

find . -type f -name "something*" -print0 |xargs -0 ...

	Run a command on LARGE set of files.  Alternatively...

grep "pattern" */*/*

	Grep at a certain directory depth.

./newmail ; mutt -f Mail/kwlug

	How I read my email. :-)

- Chris


On Tue, Dec 15, 2009 at 09:13:09AM -0500, Insurance Squared Inc. wrote:
> I want to write a post on the top 10 linux command line commands.  (for 
> two reasons.  One, cause it's useful.  Two, because I only have a top 2, 
> so I believe learning another 8 is going to help me work better :).
> 
> Here's the top 2 of my top 10:
> grep -R string *   (find a string in a directory tree - useful for 
> finding files with bits of code)
> perl -p -i -e 's/stringa/stringb/g' *   (search and replace.  yeah, I 
> know it's perl. I use it frequently).
> 
> What would your top 10 command line commands be?  Ones that you use, are 
> useful and flexible?
> 
> g.
> 
> 
> 
> _______________________________________________
> kwlug-disc_kwlug.org mailing list
> kwlug-disc_kwlug.org at kwlug.org
> http://astoria.ccjclearline.com/mailman/listinfo/kwlug-disc_kwlug.org




More information about the kwlug-disc mailing list