diff --git a/linux_notes.txt b/linux_notes.txt index 31026276..f294360c 100644 --- a/linux_notes.txt +++ b/linux_notes.txt @@ -36,6 +36,17 @@ gpg -d tar xzf +To compress/archive and encrypt a directory: + +tar cvzf = folder | gpg -c --passphrase yourpassword > folder.tar.gz.gpg + +And decompress directory: + +gpg -d folder.tar.gz.gpg | tar -xvzf - + +(make sure to clear your history afterwards) +history -c + To Display top five directories that use the most disk space: du -ahx . | sort -rh | head -5