What command do you use to replace text you find with other text?

1 answer

Answer

1066894

2026-07-26 10:10

+ Follow

Linux
Linux

To replace text in a file or string, you can use the sed command in Unix/Linux. For example, the command sed 's/old-text/new-text/g' filename replaces all occurrences of "old-text" with "new-text" in the specified file. The g at the end indicates that the replacement should be done globally throughout the file.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.