Real time cmd tool to show HDD space remaining
Clash Royale CLAN TAG#URR8PPP
Is there a command line tool which shows in real time how much space remains on my external hard drive?
debian ubuntu terminal hard-disk real-time
add a comment |
Is there a command line tool which shows in real time how much space remains on my external hard drive?
debian ubuntu terminal hard-disk real-time
2
The answer depends on the file system. For exampledf
can not show the correct values for btrfs (yet). Could you add this information to your question?
– Jonas Stein
May 3 '16 at 0:43
add a comment |
Is there a command line tool which shows in real time how much space remains on my external hard drive?
debian ubuntu terminal hard-disk real-time
Is there a command line tool which shows in real time how much space remains on my external hard drive?
debian ubuntu terminal hard-disk real-time
debian ubuntu terminal hard-disk real-time
edited May 2 '16 at 18:12
Peter David Carter
1
1
asked May 2 '16 at 16:26
oshirowanenoshirowanen
434102757
434102757
2
The answer depends on the file system. For exampledf
can not show the correct values for btrfs (yet). Could you add this information to your question?
– Jonas Stein
May 3 '16 at 0:43
add a comment |
2
The answer depends on the file system. For exampledf
can not show the correct values for btrfs (yet). Could you add this information to your question?
– Jonas Stein
May 3 '16 at 0:43
2
2
The answer depends on the file system. For example
df
can not show the correct values for btrfs (yet). Could you add this information to your question?– Jonas Stein
May 3 '16 at 0:43
The answer depends on the file system. For example
df
can not show the correct values for btrfs (yet). Could you add this information to your question?– Jonas Stein
May 3 '16 at 0:43
add a comment |
5 Answers
5
active
oldest
votes
As Julie said, you can use df
to display free space, passing it either the mount point or the device name:
df --human-readable /home
df --human-readable /dev/sda1
You'll get something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 833G 84G 749G 10% /home
To run it continuously, use watch
. Default update interval is 2 seconds, but you can tweak that with --interval
:
watch --interval=60 df --human-readable /dev/sda1
add a comment |
df
is a simple command line utility that shows you disk usage, including free space.
Check man df
for details.
1
I currently usedf -h
, which gives me the required info as and when I typedf -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.
– oshirowanen
May 2 '16 at 17:12
@oshirowanen You can usewatch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.
– Random832
May 2 '16 at 19:52
add a comment |
If you don't like the idea of dedicating a whole terminal to watch
ing the output of df
, you could consider a tool such as conky. There are countless examples of using conky
to monitor everything from HDD usage, HDD temp, ram usage, local weather, news headlines... you name it.
add a comment |
Just use the following:
watch -d df
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use thedf
andwatch
commands.
– Anthony Geoghegan
Jun 8 '18 at 8:57
add a comment |
Using the excellent answer provided above by Alexander Batischev, and this one by Ralf Friedl, I combined them with "sort" a la this link for this command:
watch -d -n 60 'df -H /dev/sd[a-z][0-9] | sort -r -k 5 -i'
That will let you watch all of your hard drives in a terminal, updated every minute, sorted by percentage of space used.
I don't know how much this answer may add to what is already here (this is my very first answer), but I thought I would put it here, in case someone comes looking for exactly what I wanted to do, which is how I ended up on this question in the first place. Thought I would try to save someone else the effort of having to figure out how to put "watch", "df" and "sort" together, if I could.
FYI, I used regex instead of just "/dev/sd*" because my system also shows several "udev" entries, which I didn't need or want to see. The command as written above hides those and only shows hard drives.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f280615%2freal-time-cmd-tool-to-show-hdd-space-remaining%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
As Julie said, you can use df
to display free space, passing it either the mount point or the device name:
df --human-readable /home
df --human-readable /dev/sda1
You'll get something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 833G 84G 749G 10% /home
To run it continuously, use watch
. Default update interval is 2 seconds, but you can tweak that with --interval
:
watch --interval=60 df --human-readable /dev/sda1
add a comment |
As Julie said, you can use df
to display free space, passing it either the mount point or the device name:
df --human-readable /home
df --human-readable /dev/sda1
You'll get something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 833G 84G 749G 10% /home
To run it continuously, use watch
. Default update interval is 2 seconds, but you can tweak that with --interval
:
watch --interval=60 df --human-readable /dev/sda1
add a comment |
As Julie said, you can use df
to display free space, passing it either the mount point or the device name:
df --human-readable /home
df --human-readable /dev/sda1
You'll get something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 833G 84G 749G 10% /home
To run it continuously, use watch
. Default update interval is 2 seconds, but you can tweak that with --interval
:
watch --interval=60 df --human-readable /dev/sda1
As Julie said, you can use df
to display free space, passing it either the mount point or the device name:
df --human-readable /home
df --human-readable /dev/sda1
You'll get something like this:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 833G 84G 749G 10% /home
To run it continuously, use watch
. Default update interval is 2 seconds, but you can tweak that with --interval
:
watch --interval=60 df --human-readable /dev/sda1
answered May 2 '16 at 17:13
Alexander BatischevAlexander Batischev
1,760415
1,760415
add a comment |
add a comment |
df
is a simple command line utility that shows you disk usage, including free space.
Check man df
for details.
1
I currently usedf -h
, which gives me the required info as and when I typedf -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.
– oshirowanen
May 2 '16 at 17:12
@oshirowanen You can usewatch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.
– Random832
May 2 '16 at 19:52
add a comment |
df
is a simple command line utility that shows you disk usage, including free space.
Check man df
for details.
1
I currently usedf -h
, which gives me the required info as and when I typedf -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.
– oshirowanen
May 2 '16 at 17:12
@oshirowanen You can usewatch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.
– Random832
May 2 '16 at 19:52
add a comment |
df
is a simple command line utility that shows you disk usage, including free space.
Check man df
for details.
df
is a simple command line utility that shows you disk usage, including free space.
Check man df
for details.
answered May 2 '16 at 16:32
Julie PelletierJulie Pelletier
6,98211340
6,98211340
1
I currently usedf -h
, which gives me the required info as and when I typedf -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.
– oshirowanen
May 2 '16 at 17:12
@oshirowanen You can usewatch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.
– Random832
May 2 '16 at 19:52
add a comment |
1
I currently usedf -h
, which gives me the required info as and when I typedf -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.
– oshirowanen
May 2 '16 at 17:12
@oshirowanen You can usewatch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.
– Random832
May 2 '16 at 19:52
1
1
I currently use
df -h
, which gives me the required info as and when I type df -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.– oshirowanen
May 2 '16 at 17:12
I currently use
df -h
, which gives me the required info as and when I type df -h
. I was after something more live or real time, i.e. something which keeps updating the terminal automatically, so I don't have to type in a command to check.– oshirowanen
May 2 '16 at 17:12
@oshirowanen You can use
watch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.– Random832
May 2 '16 at 19:52
@oshirowanen You can use
watch
, and it will run it over and over and show you fresh output (normally every two seconds). Keep in mind that only one program can update the terminal at a time under normal conditions (i.e. if you don't want to make a complete mess of your screen), so if you want to do other things at the same time you need to dedicate a terminal to it or run it in something like screen, tmux, or dvtm to split the terminal into multiple virtual terminals.– Random832
May 2 '16 at 19:52
add a comment |
If you don't like the idea of dedicating a whole terminal to watch
ing the output of df
, you could consider a tool such as conky. There are countless examples of using conky
to monitor everything from HDD usage, HDD temp, ram usage, local weather, news headlines... you name it.
add a comment |
If you don't like the idea of dedicating a whole terminal to watch
ing the output of df
, you could consider a tool such as conky. There are countless examples of using conky
to monitor everything from HDD usage, HDD temp, ram usage, local weather, news headlines... you name it.
add a comment |
If you don't like the idea of dedicating a whole terminal to watch
ing the output of df
, you could consider a tool such as conky. There are countless examples of using conky
to monitor everything from HDD usage, HDD temp, ram usage, local weather, news headlines... you name it.
If you don't like the idea of dedicating a whole terminal to watch
ing the output of df
, you could consider a tool such as conky. There are countless examples of using conky
to monitor everything from HDD usage, HDD temp, ram usage, local weather, news headlines... you name it.
answered May 2 '16 at 18:30
samsam
13.8k31426
13.8k31426
add a comment |
add a comment |
Just use the following:
watch -d df
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use thedf
andwatch
commands.
– Anthony Geoghegan
Jun 8 '18 at 8:57
add a comment |
Just use the following:
watch -d df
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use thedf
andwatch
commands.
– Anthony Geoghegan
Jun 8 '18 at 8:57
add a comment |
Just use the following:
watch -d df
Just use the following:
watch -d df
edited Jun 8 '18 at 8:35
Glorfindel
2571310
2571310
answered Jun 8 '18 at 7:58
KarlKarl
191
191
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use thedf
andwatch
commands.
– Anthony Geoghegan
Jun 8 '18 at 8:57
add a comment |
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use thedf
andwatch
commands.
– Anthony Geoghegan
Jun 8 '18 at 8:57
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use the
df
and watch
commands.– Anthony Geoghegan
Jun 8 '18 at 8:57
You should edit this answer to include an explanation of how this differs from the accepted answer - which already provides explanations on how to use the
df
and watch
commands.– Anthony Geoghegan
Jun 8 '18 at 8:57
add a comment |
Using the excellent answer provided above by Alexander Batischev, and this one by Ralf Friedl, I combined them with "sort" a la this link for this command:
watch -d -n 60 'df -H /dev/sd[a-z][0-9] | sort -r -k 5 -i'
That will let you watch all of your hard drives in a terminal, updated every minute, sorted by percentage of space used.
I don't know how much this answer may add to what is already here (this is my very first answer), but I thought I would put it here, in case someone comes looking for exactly what I wanted to do, which is how I ended up on this question in the first place. Thought I would try to save someone else the effort of having to figure out how to put "watch", "df" and "sort" together, if I could.
FYI, I used regex instead of just "/dev/sd*" because my system also shows several "udev" entries, which I didn't need or want to see. The command as written above hides those and only shows hard drives.
add a comment |
Using the excellent answer provided above by Alexander Batischev, and this one by Ralf Friedl, I combined them with "sort" a la this link for this command:
watch -d -n 60 'df -H /dev/sd[a-z][0-9] | sort -r -k 5 -i'
That will let you watch all of your hard drives in a terminal, updated every minute, sorted by percentage of space used.
I don't know how much this answer may add to what is already here (this is my very first answer), but I thought I would put it here, in case someone comes looking for exactly what I wanted to do, which is how I ended up on this question in the first place. Thought I would try to save someone else the effort of having to figure out how to put "watch", "df" and "sort" together, if I could.
FYI, I used regex instead of just "/dev/sd*" because my system also shows several "udev" entries, which I didn't need or want to see. The command as written above hides those and only shows hard drives.
add a comment |
Using the excellent answer provided above by Alexander Batischev, and this one by Ralf Friedl, I combined them with "sort" a la this link for this command:
watch -d -n 60 'df -H /dev/sd[a-z][0-9] | sort -r -k 5 -i'
That will let you watch all of your hard drives in a terminal, updated every minute, sorted by percentage of space used.
I don't know how much this answer may add to what is already here (this is my very first answer), but I thought I would put it here, in case someone comes looking for exactly what I wanted to do, which is how I ended up on this question in the first place. Thought I would try to save someone else the effort of having to figure out how to put "watch", "df" and "sort" together, if I could.
FYI, I used regex instead of just "/dev/sd*" because my system also shows several "udev" entries, which I didn't need or want to see. The command as written above hides those and only shows hard drives.
Using the excellent answer provided above by Alexander Batischev, and this one by Ralf Friedl, I combined them with "sort" a la this link for this command:
watch -d -n 60 'df -H /dev/sd[a-z][0-9] | sort -r -k 5 -i'
That will let you watch all of your hard drives in a terminal, updated every minute, sorted by percentage of space used.
I don't know how much this answer may add to what is already here (this is my very first answer), but I thought I would put it here, in case someone comes looking for exactly what I wanted to do, which is how I ended up on this question in the first place. Thought I would try to save someone else the effort of having to figure out how to put "watch", "df" and "sort" together, if I could.
FYI, I used regex instead of just "/dev/sd*" because my system also shows several "udev" entries, which I didn't need or want to see. The command as written above hides those and only shows hard drives.
answered Jan 20 at 9:52
Wayne ChesserWayne Chesser
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f280615%2freal-time-cmd-tool-to-show-hdd-space-remaining%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
The answer depends on the file system. For example
df
can not show the correct values for btrfs (yet). Could you add this information to your question?– Jonas Stein
May 3 '16 at 0:43