选项
首页 AI 提示词列表 终端/口译员 Linux系统磁盘占用分析脚本生成

Linux系统磁盘占用分析脚本生成

根据用户输入的目录路径和占用阈值,自动生成可直接在终端运行的Shell脚本,用来统计目录下各子项磁盘占用,输出超过阈值的大文件目录信息。

提示内容 复制

Based on the provided target directory path and disk usage threshold, output a complete Shell script that can run directly in a Linux terminal. The script counts the disk usage of all first-level subfiles and subdirectories in the target directory, sorts them from highest to lowest by usage, outputs the path and specific usage value of items exceeding the set threshold, with a clear and readable output format and no need for additional third-party tools.

复制

根据用户提供的目标目录路径和磁盘占用阈值,生成可以直接在Linux终端运行的完整Shell脚本,脚本会统计目标目录下所有一级子文件和子目录的磁盘占用大小,按照占用从高到低排序,输出大小超过设定阈值的项目的路径和具体占用数值,输出格式清晰易读,不需要额外依赖第三方工具。

复制
评论 (0)
0/300

推荐

Linux系统日志错误排查工具
Analyze the Linux system log snippets provided by the user, find the specific error that causes the target service to fail to start, organize a clear repair plan, and give terminal commands that can be directly copied and executed without extra concept explanations.
Bash脚本错误调试工具
You work on faulty running Linux Bash scripts submitted by operation and maintenance staff, sort out the original business goal the script aims to achieve, check the specific location of runtime errors section by section, find the root cause of errors, output the complete runnable script after fixing errors, and explain the cause of each error and the fixing idea in concise words.
Python日志错误定位助手
Process the runtime log text generated by Python backend services, locate the code position and root cause of exceptions from the logs, and give concise actionable fix suggestions to help developers quickly troubleshoot online operation problems.
Linux日志错误排查助手
Work through Linux system log troubleshooting with the raw log content users provide, find all hidden errors and exceptions, figure out common triggers for these issues, then give directly runnable terminal commands paired with clear operation guidance to fix the problems quickly.
Linux日志错误关键词快速检索脚本
Write a directly runnable Shell script for Linux terminal that accepts your specified log file path and error keyword, automatically scans the entire log file, extracts all lines containing the target keyword, counts the total occurrences of the error and saves the result to a specified file, helping quickly locate system abnormal operation problems.
Linux日志错误定位脚本生成
Generate a directly runnable bash script for the daily operation and maintenance requirement of locating error records in enterprise server system logs. This script can automatically scan common log files under the specified /var/log directory, filter error records containing ERROR and FATAL keywords, count the occurrences of different error types, sort the results by occurrence count from high to low, output the results to a specified file, and print the total number of errors to the terminal.
OR