From 0fbe0d531cb9278815064bfb419a8eb9b2a52672 Mon Sep 17 00:00:00 2001 From: wuzhaomin Date: Tue, 27 Feb 2024 15:41:10 +0800 Subject: [PATCH] Add the get df function to the Diskinfo class --- category/get_disk_info.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/category/get_disk_info.py b/category/get_disk_info.py index 634cc86..f3a1deb 100644 --- a/category/get_disk_info.py +++ b/category/get_disk_info.py @@ -25,4 +25,13 @@ class DiskInfo: res_blkid = FileOperation.wrap_output_format(cmd_name, cmd_result, '=') res_all = res_fdisk + res_blkid - return Command.cmd_write_file(res_all, self.__default_file_name) \ No newline at end of file + return Command.cmd_write_file(res_all, self.__default_file_name) + + def __get_df_h_info(self): + ''' + exec df -h + ''' + df_h_command="df -h" + cmd_result = Command.cmd_run(df_h_command) + cmd_name = df_h_command + return Command.cmd_output(cmd_name, cmd_result, self.__default_file_name, '=') \ No newline at end of file -- Gitee