Is there a command line tool which shows in real time how much space remains on my external hard drive?
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
watch --interval=60 df --human-readable /dev/sda1
If you don't like the idea of dedicating a whole terminal to
watching 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.
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.