VI – Search and Replace with a pathname Linux 12/06/201117/08/2021Tristan SelfLeave a Comment on VI – Search and Replace with a pathname 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