Search code examples
javanfsnfsclient

How to get size of NFS Export point at client side?


Can anyone please tell me how to get the size of the NFS Export point at the client side if the export point is available? Is there any command / Java API available for the same?


Solution

  • Take a look at Lucas' answer here: How to find how much disk space is left using Java. If you pass the mount point on the NFS client in to the getTotalSpace() and/or getUsableSpace() methods on the File class, it should return the relevant information for that export.