我已经在 Linux 中编写了这个脚本 Scrit。
我现在需要知道每个子目录的大小,条件是-atime +${DAYS}
从 directory 向下搜索$DIR
。结果应收集在一个文本文件中$FILENAME
。
#!/bin/bash
#Days ago to search
DAYS="1"
#Path to directory to be searched
DIR="/media/nss/MBVOL2/TEST1/"
#Result filename Solomon
FILENAME="/media/nss/MBVOL2/TEST1/solomon2.txt"
# Process of listing these files in a result text file
find "${DIR}" -type f -atime +${DAYS} -print > $FILENAME
Run Code Online (Sandbox Code Playgroud)