View Single Post
  #6  
Old 08-14-2006, 07:38 PM
minckster minckster is offline
Registered User
 
Join Date: Apr 2006
Posts: 18
Whew! Here's the line to add to .bashrc to redefine 'locate' so it excludes everything on the backup drive:
Code:
# Exclude the backup drive from locate's results
function locate() { command locate $1 | grep -vw \/Volumes\/Backup\ HD; echo "  ***REM: I redefined locate to exclude Backup HD***"; }
Of course the 'echo' part isn't required. I want it there in case something goes wrong with my custom 'locate,' so I won't forget that I had customized it.

I'm not quite sure if it should be '$1', '$*' or '$@'. '$1' seemed safest.
Reply With Quote