find / -name a_file_name_fragment_with_a_star* > new_file.something is a neat trick, and once you done dat, u can also do a less the_file_produced_by_find_>, as then the command /some_other_fragment, once within less, is a good search technique, and quick. The search can be repeated inside less, of course, by just repeating the / (you do not need to retype the thing searched for, it stays in memory) exiting less is a quick q.
As one knows, grep is oft piped to sed which is a stream editor, sed can then cut thing up thus found, and print them to other files for handy sub list, such as a list of duplicate filename ..e.g. all the directories a file name is found in .. etc...
One thing I have found is tough is to unambiguously explain commands so a newbie is not confused. Of course "new_file.something" means some file name you make up on the command line. But does it mean that to everyone? I find Backus-Naur formalism with all its square brackets confusing. Short of that is, there a simple way to convey when you mean a Unix command, and when you are describing something inserted as an object of a command, such as file name.. Here I have bolded all real commands in Unix or a Unix tool, and sub_lined all descriptive terms that indicate something you make up such a file name.
I pity the reader more, but I hardly pity the parser much less!
EC<:-} |