From ae7609caf242c5a02d4606b49b0d8e21ffe546c3 Mon Sep 17 00:00:00 2001 From: terminalforlife Date: Fri, 19 Mar 2021 19:51:36 +0000 Subject: [PATCH] Add more examples to du cheat sheet --- sheets/du | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sheets/du b/sheets/du index 27307f5..a710ec3 100644 --- a/sheets/du +++ b/sheets/du @@ -20,3 +20,12 @@ # to have a new root-owned BASH session, which then executes the commands # proceeding the `-c` flag. sudo bash -c 'du -xh / | sort -rhk 1 | head -n 20' + +# Display just the total human-readable size of the current working directory. +du -sh + +# Display the total human-readable size of the three provided directories, as +# well as the grand total of the combined directories. +du -chs ~/Desktop ~/Pictures ~/Videos +# You could potentially make this task a bit easier with BASH brace expansion. +du -chs ~/{Desktop,Pictures,Videos}