unix commands - sreeragravindran/references GitHub Wiki

grep

word count

grep “search text” file | wc -l 

return Substring

grep -oE “regexpattern” file 
grep -oe "/trn:tesco:uid:uuid[^.]*" 

eliminate duplicates

grep “pattern” file | sort -u 

kill process

ps -eaf | grep <service> | grep -v grep | awk '{print $2}' | xargs  sudo kill -9

watch file

watch tail -n 15 <filename> 

list volumes / partitions

lsblk  

disk usage

du https://www.geeksforgeeks.org/du-command-linux-examples/

disk free

df https://www.geeksforgeeks.org/df-command-linux-examples/

AWS extend partition / filesystem to available volume

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

⚠️ **GitHub.com Fallback** ⚠️