[vox] directories - too much of a good thing?

Mike Simons vox@lists.lugod.org
Sat, 22 Mar 2003 19:12:55 -0500


On Sat, Mar 22, 2003 at 03:53:40PM -0800, Katie wrote:
> then I moved the school stuff over to my programs directory and had to
> create tons of directories to keep it all separate, but when I want to
> compare two programs I have to do some major hunting.
[...]
> How do you break up this directory so it's organized but you can still
> find stuff?

- Could you explain what sort of layout you made in that combined
  programming directory, that is hard to find things?

  school/class/proj1 (style Samuel mentioned), sounds really good

  maybe do cs/year/proj1 style if you don't take many classes... all you
need to remember is what year you did things.

I normally have a few directories:
  src    - my personal programs
  debian - things I've done 'apt-get source' on
  cvs    - things I've checked out of other CVS trees

> Even locate won't
> work because I can't remember what names I used for the older school
> programs or what project number they were in.

  Generally when I know I wrote some program to do something related,
but I don't remember what it's called or where I put it I do something 
like this to find something like "foobar":

  find ~/src -print0 | xargs -0 grep -i "foobar" | less

  You have to remember some magic string from the program like what
function calls it _had_ to made to do whatever, or some string or
variable you would have used in it.
  The find generates a list of files in my src directory, the grep 
prints out matched lines... I can then cd into directories that look
promising...

  Sometimes I change the grep a bit, add -l will only list file names,
-3 will give me three lines of context before and after the math.

    Later,
      Mike