Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know I should be using ls, but there are so many ways to do this thing, right? I'm trying ls -S +10 k, but nothing. What should i do?

share|improve this question

migrated from stackoverflow.com Mar 11 '13 at 4:15

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

You can use the find command instead:

find . -type f -size +10k

If you want to limit to only the current directory level:

find . -maxdepth 1 -type f -size +10k
share|improve this answer
1  
+1. Simple, lightweight, fun and tasty –  uʍop ǝpısdn Mar 10 '13 at 23:15
    
how do you do it with ls if i want to display all files and sub-dir larger than +10K –  Mohammad Sabbar Mar 10 '13 at 23:16
    
Although the ls command has options to traverse sub-directories recursively, it does not have options to filter the list based on file sizes, not that it is not doable (say by piping it to xargs, head, etc.), but not just really worth the effort IMO :) –  Tuxdude Mar 10 '13 at 23:21
add comment
ls -lR |awk '$5 >10240'

Should do the job - and it's using ls.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.