Getting the biggest file list might look like
gci -r|sort -descending -property length | select -first 10 name, length
How can I add a specific filetype selection , like ascii or formated log/json/yaml files?
And an option about selecting them only over 30days age might be also a good idea.
My goal is to accumulate filters:
- only work on text files (ignore any other)
- sort them by size
- optional : sort to keep only the more than 30days old ones
- keep & list the 10 biggest ones.
I can compare that need to that linux command line that feet all of my needs :
find . -type f -ctime +30 ! -executable -exec file {} + | grep -i ASCII | du -ah | sort -rh | head -10
someone gave me a solution to work around
this looks good, to work around