From d184261ab04b32437d93e8975e299c2d2a601670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=C4=B0lhan?= Date: Sat, 12 Jan 2019 21:36:17 +0300 Subject: [PATCH 1/3] Adds disk space commands to linux. --- linux.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/linux.md b/linux.md index 3bb925b7c..23b9f7b36 100644 --- a/linux.md +++ b/linux.md @@ -11,3 +11,19 @@ title: Linux sudo visudo username ALL=(ALL) NOPASSWD:/sbin/restart whatever + +### Display the amount of available disk space + + $ df + +All File System: + + $ df -a + +Human Readable Format: + + $ df -h + +Largest 10 folder/file in the current directory: + + $ du -hsx * | sort -rh | head -10 From 57540e6d6473c3a6a712464929367eb089529770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=C4=B0lhan?= Date: Sat, 12 Jan 2019 21:43:58 +0300 Subject: [PATCH 2/3] Seperates disk usage --- linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux.md b/linux.md index 23b9f7b36..a47efbd91 100644 --- a/linux.md +++ b/linux.md @@ -24,6 +24,8 @@ Human Readable Format: $ df -h +### Display disk usage + Largest 10 folder/file in the current directory: $ du -hsx * | sort -rh | head -10 From caa337d5ea18b8ef9dc36f2073c6aef99d36a2ae Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Wed, 1 Jan 2020 09:58:25 +1100 Subject: [PATCH 3/3] Update linux.md --- linux.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/linux.md b/linux.md index b6f2e8062..8deecd38c 100644 --- a/linux.md +++ b/linux.md @@ -14,21 +14,18 @@ title: Linux ### Display the amount of available disk space - $ df - -All File System: - - $ df -a - -Human Readable Format: - - $ df -h +```sh +df +df -h # human-readable format +df -a # all filesystems +``` ### Display disk usage -Largest 10 folder/file in the current directory: - - $ du -hsx * | sort -rh | head -10 +```sh +du +du -hsx * | sort -rh | head -10 # largest 10 folders +``` ### Answer yes in a bash script