SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Linux OS.: Technical questions

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Thomas A Watson who wrote (333)11/22/2002 5:05:25 AM
From: E. Charters  Read Replies (1) of 484
 
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<:-}
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext