Hi there,
Quote:
Originally Posted by BeachHead
i have a debian based internet router running on a 16GB CompactFlash Card. It contains a 15GB partition for CIFS that gets accessed by windows systems.
The problem is i don't see (on the windows client side) how much space is left on the share
|
you don't?? Usually Windows Explorer displays the free capacity of a partition in the status line, or in the properties dialog.
However, it does that only if the network share is mapped to a drive letter. But that's a flaw of Windows.
Quote:
Originally Posted by BeachHead
so i thought about creating a file on the share that always includes the free space value by creating a cron job that updates that file every second or so but i guess it would be much better if it only gets updated after actual I/O writes.
|
Apart from creating additional CPU load on the small box, that would mean duplicating a feature on application level which is already available on the protocol level.
Quote:
Originally Posted by BeachHead
Any ideas how to do that in bash?
|
You get the total/used/available capacity of a mounted file system with 'df'. Probably have to 'grep' or 'awk' a little bit on the output to extract the information you want, or leave the output of 'df' as it is.
Quote:
Originally Posted by BeachHead
Additionally, i once stumbled upon some kind of 'mini http server' with curl, wget or something. But i can't remember anymore. Getting the 'free space' by http would be nice as well.
|
You're really going around in circles to re-invent the wheel. Btw, curl and wget are client-side components. I can't imagine how you could get them to act as a server. But there are quite a few light HTTP servers available for Linux.
[X] Doc CPU