Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 9428  / 1 Year ago, tue, january 17, 2023, 12:10:08

I need to find the files in my current directory whose size is less than or equal to 10 MB. ls -lh gives me the file size of each file, but I'm not sure how to find the files whose size are less than or equal to 10 MB.


host@407d:t1_snapshot$ ls -lth

More From » find

 Answers
1

Should be



find ./ -maxdepth 1 -type f -size -10M


That is find:




  • this directory only


  • type is a file


  • size less than 10 megs



[#28046] Tuesday, January 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
measord

Total Points: 259
Total Questions: 131
Total Answers: 106

Location: Venezuela
Member since Sun, Oct 2, 2022
2 Years ago
measord questions
Wed, Jul 14, 21, 21:39, 3 Years ago
Mon, May 16, 22, 21:12, 2 Years ago
Mon, Oct 11, 21, 03:11, 3 Years ago
Sun, Apr 17, 22, 21:22, 2 Years ago
;