Advertisement
metalx1000

BASH Count Files in Folders

Dec 3rd, 2022
1,220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.18 KB | None | 0 0
  1. #count the number of files in each folder and sort them from lest to most
  2. find . -type f | awk -F\/ '{print $2}' | sort | uniq -c | sort -n | awk '{print $1 " " substr($0,index($0,$2))}'
Tags: BASH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement