How to find disk space of remote linux machine usi

2019-08-11 02:58发布

This question already has an answer here:

I am looking for simple solution for finding total disk space and available space of a remove machine using java program.

Please help

Update There are questions already similar to this with primarily focus on local machine. I was looking solution for remote machine.

1条回答
做自己的国王
2楼-- · 2019-08-11 03:13

The easiest way to get the remote machine information and also safe way to do is to SSH to the server from Java and get the necessary information from.

use JSch Library for SSH connection to server.

for an example look here

查看更多
登录 后发表回答