parent
c4601a5a30
commit
ce695cd672
1 changed files with 22 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
mkdir -p -m 0700 /tmp/inspect-trash-usage |
||||||
|
|
||||||
|
Count=0 |
||||||
|
|
||||||
|
cd /home |
||||||
|
for TD in /home/*/.local/share/Trash; do |
||||||
|
DU_FILE=/tmp/inspect-trash-usage/trash-disk-usage.txt |
||||||
|
TU=$(echo "$TD" | sed -e 's|^/home/||; s|/.*$||g') |
||||||
|
if grep -w "/home/$TU" "$DU_FILE"; then |
||||||
|
continue |
||||||
|
fi |
||||||
|
echo -n "$TU : " >&2 |
||||||
|
time du -s "$TD" > "$DU_FILE.out1" |
||||||
|
cat "$DU_FILE.out1" >> "$DU_FILE" |
||||||
|
cat "$DU_FILE.out1" |
||||||
|
if ((Count > 200)); then |
||||||
|
break |
||||||
|
fi |
||||||
|
((++Count)) |
||||||
|
done |
Loading…
Reference in new issue