|
|
|
|
|
by gnosek
3726 days ago
|
|
ls -U avoids the default sort by name. Without -U you get all the names at once at the end of the directory scan. With the option you get them one by one (in some unspecified order) and can make sort of a progress bar for counting files in large directories: ls -U huge_dir | awk 'NR % 100000 == 0 { print NR } END { print NR }'
(prints the count every 100k files and the total at the end). |
|