From 0f3d6baa73d51944f6b38ed5146196c631aa1cef Mon Sep 17 00:00:00 2001 From: tomit4 Date: Fri, 15 Oct 2021 23:55:25 -0700 Subject: [PATCH] updated gpg and tar notes --- linux_notes.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) 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