for f in *; do mv "$f" "${f:1}"; done
for f in *; do mv "$f" "8$f"; done
du -sh /* | sort -hr
find /var/lib/mysql -type f -print0 | xargs -0 sha256sum > mysql.sha256sum
sed -e '/multiverse/s/^/#/' -i /etc/apt/sources.list sed -e '/multiverse/s/^#//' -i /etc/apt/sources.list
for file in $(grep -cr --include "*.html" "somestring" . | awk -F ":" '{print $1}');do sed -i 's/\bsomestring\b/newstring/g' $file;done
\b is word boundary, meaning it won't select strings like string_somestring_smth_smth Put sed -n… and ..newstring/gp' to just see the changes without actually making them.
zcat server_20170726-060002.log.gz | awk '/2017-07-25\ 20:54:59.381/,/2017-07-25\ 21:16:00.948/' - > incident.txt
sed 's/\blocalhost\b/& blablah/' file
du -s /var/lib/mysql/mydb/{table1,table2,table3}.* | awk '{ sum+=$1} END {printf sum/1024^2; print " GB"}'
sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'|grep -E "(image|headers|modules)" | grep -v hwe | xargs sudo apt-get -y purge