• Post Reply Bookmark Topic Watch Topic
  • New Topic

option with ls command  RSS feed

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do you list files in decreasing order of file size? there has to be an option in ls, right?

MSM
 
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ls -s | sort -nr
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,
I tried this command "ls -al|sort -k 5" and it worked...The command u've specified also works fine.
10x anyway

MSM
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!