Tips-Useful commands

1. Creating a tar.gz file:

tar -czpf folder_name.tar.gz folder_name

this command create folder_name to folder_name.tar.gz 。
2. Seaching a specific word/string from a file

find ./ -name ‘*.html’ -exec grep “” ‘{}’ \; -print

This command searchs all html files which contains ""string.
3. Find & replace

sed -i ’s/b/strong/g’ index.html

This command searchss "b" from "index.html" and then replace it with "strong" .
4. Checking a folder's space status

du -h --max-depth=1 | sort -n -r

Creative Commons License's blog posts is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License