Q : split large log file

split -b 50m catalina.out log.part.

Q : fetch last 100 line and dump to file

tail -n 100 catalina.out > log

Q : mkdir recusively

mkdir -p ~/x/y

Q : compress and decompress tar file

tar -zcf log.tar.gz log*
tar -zxf log.tar.gz

Q : decompress gz file

gunzip log.gz
gunzip -S zip lottery-kill.log.2018-08-22.0.zip

Q : kill process in one command

kill -9 $(ps aux | grep java | grep -v grep | awk {'print $2'})

Q : find top 10 large file in directory

du -a /var | sort -n -r | head -n 10

Q : find file or directory with name

find /home -iname 'showVersion.sh' -type f
find /home -iname 'script' -type d