Closing files which contain a specified phrase
Sometimes, when editing a lot of files, it is useful to be able to close a selection of files which contain a specific search phrase. Here's how:
- First, make sure all files are saved. Ctrl-L will open a list io files. those which have not been saved will have an asterisk after their name.
- Now do a Search and Replace. The Search phrase should be the phrase contained in the files you wish to close. The replace expression can be anything - or even blank. Go - Replace all.
- Go to the list of files you opened previously - or open one Ctrl-L. Press Menu on the list. 4th item down is Kill ->. Go to the sub-menu and click on the third item Changed.
All the files which contained the search phrase you used will be killed without being saved, leaving you with the files that did not contain the phrase.
Was this page helpful? Please email me and/or rate this page:
If you want a reply make sure any email address @torrens.org will not get spam-binned!
Other relevant pages
Top of page
Document URI: http://stronged.torrens.org/man/examples/KillFiles.html
Page first published Tuesday the 1st of May, 2018
Last modified:Wed, 06 Mar 2019 19:14:11 GMT
© 2018 - 2021 Richard Torrens.