Linux Cheatsheet

kuniga.me > Docs > Linux Cheatsheet

Linux Cheatsheet

How-To

Save stdout/stderr to file while still displaying in terminal

command 2>&1 | tee file.txt

Find-replace inside a file

sed "s/search/replace/g" filename

NOTE: the delimiter / is customizable, so you can also do:

sed "s@search@replace@g" filename

Which is very useful if replacing entries like filename.