1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-23 00:15:08 +00:00

feat(clean): add storage clues after large files

This commit is contained in:
tw93
2026-02-23 11:34:04 +08:00
parent 1169cbf198
commit 3112673ed3
4 changed files with 448 additions and 6 deletions

View File

@@ -410,7 +410,8 @@ clean_local_snapshots() {
local snapshot_count
snapshot_count=$(echo "$snapshot_list" | { grep -Eo 'com\.apple\.TimeMachine\.[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{6}' || true; } | wc -l | awk '{print $1}')
if [[ "$snapshot_count" =~ ^[0-9]+$ && "$snapshot_count" -gt 0 ]]; then
echo -e " ${YELLOW}${ICON_WARNING}${NC} Time Machine local snapshots: ${GREEN}${snapshot_count}${NC}${GRAY}, Review: tmutil listlocalsnapshots /${NC}"
echo -e " ${YELLOW}${ICON_WARNING}${NC} Time Machine local snapshots: ${GREEN}${snapshot_count}${NC}"
echo -e " ${GRAY}${ICON_REVIEW}${NC} ${GRAY}Review: tmutil listlocalsnapshots /${NC}"
note_activity
fi
}