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.

How can i list all files with a size less than 400 bytes and having the rights 644 ?

share|improve this question

migrated from stackoverflow.com Apr 4 '11 at 8:03

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

    
find can do this. Type man find –  Randolf Richardson Apr 2 '11 at 11:51
add comment

1 Answer

find $directory_to_search -perm 644 -size 400c

should do the trick.

share|improve this answer
2  
he wanted atmost 400 bytes so it should be -size -400c –  flolo Apr 2 '11 at 11:56
    
thanks a lot ,it works ! –  maalem Apr 2 '11 at 19:16
1  
Perhaps add -type f –  reinierpost Apr 4 '11 at 8:07
add comment

Your Answer

 
discard

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