I need to provide a detailed list of files in a directory in descending order of the file size. only to include 10 files in my output. I can not include sub directories in my output. I'm having the problem with the last part, "not including sub directories" here is what I have so far but I'm stuck on excluding subdirectories. Also if you could look at the below command to advise if this is correct
de@Classbox:~/LI_1/etc$ ls -lh -S | sort -r |head -10
I know if i use
grep -v d it will exclude directories but I need it to exclude subdirectories.