I am asking for general opinions on how to find files quickly.
One typical scenario is that I often need to grep some names from a PeopleNameFile.txt from Dir1. When I’m in a different directory, I am forced to grep the file with a long directory path. It would be nice to just do GREP “Warren Buffett” PeopleNameFile.txt.
BTW, I’m using Cygwin but I welcome any suggestions.
You can easily write a simple bash function in your ~/.bashrc:
Then later on, at command line you can type:
the nice thing is that you can actually include other grep parameters if you like as in:
(The
$characters represent your shell prompt, not part of the command you type.)When you edit the .bashrc file FOR THE FIRST TIME you may have to source it in your existing open cygwin windows:
But if you open a new window you should not have to do that.
Good luck, have fun