Linux and Nagios‎ > ‎

VI - Search and Replace with a pathname

posted 12 Jun 2011, 07:20 by Tristan Self
Find and replace with VI on a pathname is a bit tricky you ned to use escape characters.

In this case /bin/mail should be replaced with /usr/bin/mail

The command below would do it:

:%s/\/bin\/mail/\/usr\/bin\/mail/g
Comments