Knowledge Base

Cheat sheet: Linux commands

Link to a comprehensive linux cheat sheet:

https://www.cheatography.com/davechild/cheat-sheets/linux-command-line/pdf/

Replace string in multiple files

Replace string1 by string2 in 1 file

sed -i -e "s/string1/string2/g" file

Replace recursively:

find <dir> -type f -print0 | xargs -0 sed -i -e 's/chainorigin/newchain/g'

 

News
Suggest Content…