# Search and Replace in a file

**URL:** <https://forums.thehomestack.io/t/search-and-replace-in-a-file/189>\
**Category:** Linux - General\
**Created:** [December 19, 2004, 2:43am UTC](https://forums.thehomestack.io/t/search-and-replace-in-a-file/189 "2004-12-19T02:43:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://forums.thehomestack.io/uploads/default/original/1X/161426793bc0d8bdf0d1a6692b3e44446861cc72.jpeg) [@system](https://forums.thehomestack.io/u/system)\
**Post date:** [December 19, 2004, 2:43am UTC](https://forums.thehomestack.io/t/search-and-replace-in-a-file/189/1 "2004-12-19T02:43:13Z")

</div>

search and replace

```auto

sed -e 's/what/to/g' file > newfile

```
