Ubuntu command cheat sheet

Show directory size

//for specific directory
du -sh targetedDirectory

//for all directories
du -sh /*

//in kilobytes
du -sh -k /*

 

GZIP in a specific location

gzip -c yourFilesNeedToGzip > /locationWhereYouWantToSaveGzip/filename.gz