diff --git a/linux_notes.txt b/linux_notes.txt index c577564b..3521b3dc 100644 --- a/linux_notes.txt +++ b/linux_notes.txt @@ -24,6 +24,19 @@ du -c /directory (displays total disk usage) du -h /directory (displays total disk usage by file/subdirectory in human readable format) du -hc /directory (displays total disk usage and usage by file/subdirectory in human readable format) +To compress/archive and encrypt a file: + +tar czf + +gpg -c + +Enter passphrase, and repeat it. + +To decompress said file: +gpg -d + +tar xzf + To Display top five directories that use the most disk space: du -ahx . | sort -rh | head -5