"$d_SysMaint""Linux/du notes.txt" www.BillHowell.ca 03Feb2020 initial 08********08 15Sep2021 I revamped "$d_bin""du_diff.sh" 08********08 21Jun2020 Don'T use : see "$d_bin""du_diff.sh" updated from 04Jun2019 $ bash "$d_bin""du_sort.sh" dir='/home/bill/PROJECTS/' du -ch --max-depth=1 "$dir" | sed "s#\(.*\)\t\($dir\)\(.*\)#\3\t\1#" | sort | sed "s#\(.*\)\t\(.*\)#\2\t\1#" # >"$d_temp""du1.txt" du_diff() { du -ch -t 1M --max-depth=1 "$dir1" | sed "s#$dir1##" | sort >"$d_temp""du1.txt" du -ch -t 1M --max-depth=1 "$dir2" | sed "s#$dir2##" | sort >"$d_temp""du2.txt" diff "$d_temp""du1.txt" "$d_temp""du2.txt" >"$d_temp""du_diff.txt" } ********* 03Feb2020 trim LMDE /home/bill to move PROJECTS $ du --all --max-depth=2 /home/bill ********* $ man du -c, --total produce a grand total -d, --max-depth=N print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) -k like --block-size=1K -m like --block-size=1M -t, --threshold=SIZE exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative --time show time of the last modification of any file in the directory, or any of its subdirectories --time=WORD show time as WORD instead of modification time: atime, access, use, ctime or status --time-style=STYLE show times using STYLE, which can be: full-iso, long-iso, iso, or +FORMAT; FORMAT is interpreted like in 'date' -X, --exclude-from=FILE exclude files that match any pattern in FILE --exclude=PATTERN exclude files that match PATTERN # enddoc