Article 6JXG8 [SOLVED] List files by size (easy-ish) - pass list to a bash script (difficult)

[SOLVED] List files by size (easy-ish) - pass list to a bash script (difficult)

by
GPGAgent
from LinuxQuestions.org on (#6JXG8)
I had a nice little script, sadly I deleted the notes I took and I cannot recreate it.

I want to loop through a folder of files, order by size - biggest first, then pass that to a bash script to process it.
Quote:
ls -lS | awk '{print $9}'
But some files have spaces and it only prints the first word of the filename :-(
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments