Linux Commands

So far, this page is simply for reference. I’ll probably grow this list as I get asked the “how do i?” questions more often.

Compress *.tar.gz
tar -zcvf archive-name.tar.gz directory-name
tar -zcvf archive-name.tar.gz *

Decompress *.tar.gz
tar -zxvf file.tar.gz
tar -zxvf file.tar.gz -C /tmp

Finding Disk Usage
Will give you your partition sizes and usages:
df

Will help narrow down which folders contain the most data:
du -hs * | sort -h

Leave a Reply

Your email address will not be published. Required fields are marked *


*