tree
→ Creating an "index" of your data:
for drive in /mnt/*
do
disk=$(basename "$drive")
echo "${drive}"
tree -fFhins --du /mnt/${drive} -o ~/${drive}.log
done
# Meanings
# -f | Prints the full path prefix for each file.
# -F | Append `/' for directories,
#. | `=' for socket files
# | `*' for executable files and
#. | `|' for FIFO's, as per ls -F
# -h | Human readable output on size report
# -i | Makes tree not print the indentation lines,
#. | useful when used in conjunction with the -f option.
# -n | Turn colorization off always, over-ridden by the -C option.
# -s | Print the size of each file along with the name.
# --du For each directory report its size as the accumulation
#. of sizes of all its files and sub-directories