The two scripts here collect various features that I've needed over the years when I had to manage large numbers of files from the command line. Use the appropriate script to find files by either their name or their contents and then print the results to screen or perform an operation on the files (copy/move/delete). Detailed documentation is obtained by running a script without any arguments, but here are some features of the scripts:
- Search by file name, suffix, or a set of suffixes.
- Copy or move files in either flat mode (all files go to a single directory) or mirrored mode (recreate the file tree for the copied/moved files).
- Search additively by as many terms as you want.
- Apply negative search terms to subtract from the above results.
- Require hits to be within 'n' lines of each other.
- Show 'n' lines of context before/after each hit.
While I have used all the features in these scripts, they have not been tested by anyone else, so please let me know if you find any issues or have a feature request.