15 lines
462 B
Bash
Executable File
15 lines
462 B
Bash
Executable File
#!/bin/bash
|
|
# File extension distribution report
|
|
# Generated for /root directory exploration
|
|
|
|
echo "File Extension Distribution in /root"
|
|
echo "======================================"
|
|
echo ""
|
|
|
|
find /root -type f 2>/dev/null | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -20 | while read count ext; do
|
|
printf "%7d %s\n" "$count" "$ext"
|
|
done
|
|
|
|
echo ""
|
|
echo "Total unique extensions found:"
|
|
find /root -type f 2>/dev/null | sed 's/.*\.//' | sort -u | wc -l |