I am trying to make a simple korn script to list file size in multiple directories I am using loop to change the directory but the command
ls -lrt
Giving me all the file details which I need but it's displaying file size in non readable format. I want to have it in readable format like 100k or 2M.
I tried
ls - lh
And
ls -l --block-size=M
Both not working in korn
Please assist.