Finding a lost PYTHONPATH with find

John J. Lee jjl at pobox.com
Sun May 28 13:35:16 EDT 2006


OK, this is really a reminder to myself next time I forget where I set
my PYTHONPATH and forget exactly how to invoke the GNU "find" command
;-)

Hope somebody else finds it useful too

find / -maxdepth 3 -size -100k -type f -exec grep -sli pythonpath '{}' \;


The minus in '-100k' (meaning "less than 100k") seems to be
undocumented, at least on my system.  I suppose the -maxdepth is
redundant since I think find searches breadth-first by default.

The file I was looking for turned out to be in /etc/profile.d/, whose
existence I completely forgot about...


John



More information about the Python-list mailing list