Breaking News
Home / Sys Admin / Unix / How to find a list of files greater than a given size in Unix?

How to find a list of files greater than a given size in Unix?

Solution

Use the find command with ls command to find a list of file in the current directory that are over 1000k or 1MB 

find . -size +1000k -print0 | xargs -0 ls -lSh

Output

rw-r–r–  1 mvohra  staff   1.7M Sep 14 20:53 ./work/lohri/Lohri_10.psd
-rw-r–r–  1 mvohra  staff   1.7M Sep 13 22:30 ./work/basakhi/baisaki_07.psd
-rwxr-xr-x@ 1 mvohra  staff   1.6M Sep  4 22:02 ./work/ganesh/Ganesh Chaturthi_02.psd
-rwxr-xr-x@ 1 mvohra  staff   1.6M Sep  4 22:11 ./work/newyear/NewYear_03.psd
-rwxr-xr-x  1 mvohra  staff   1.6M Sep  4 10:11 ./work/diwali/Diwali_05.psd
-rwxr-xr-x@ 1 mvohra  staff   1.5M Sep 14 22:18 ./work/durga/Durga_Pooja_09.psd
-rwxr-xr-x  1 mvohra  staff   1.4M Sep  4 22:15 ./work/onam/Onam_16.psd
-rw-r–r–  1 mvohra  staff   1.4M Nov  7  2007 ./work/holi/colorful_divali.psd
-rwxr-xr-x@ 1 mvohra  staff   1.4M Sep  4 22:09 ./work/newyear/NewYear_07.psd
-rw-r–r–  1 mvohra  staff   1.4M Sep 14 20:56 ./work/lohri/Lohri_02.psd
-rw-r–r–  1 mvohra  staff   1.3M Nov  7  2007 ./work/diwali/diwali_fireworks_blast.psd
-rw-r–r–  1 mvohra  staff   1.3M Sep 13 22:14 ./work/basakhi/baisaki_01.psd
-rw-r–r–  1 mvohra  staff   1.3M Sep 14 20:53 ./work/lohri/Lohri_09.psd
-rw-r–r–  1 mvohra  staff   1.3M Sep 14 20:57 ./work/lohri/Lohri_01.psd
-rwxr-xr-x@ 1 mvohra  staff   1.3M Sep  4 22:08 ./work/newyear/NewYear_10.psd
-rwxr-xr-x@ 1 mvohra  staff   1.3M Sep  4 10:11 ./work/diwali/Diwali_07.psd
-rw-r–r–  1 mvohra  staff   1.2M Nov  7  2007 ./work/diwali/elephant_best_luck.psd
-rwxr-xr-x@ 1 mvohra  staff   1.2M Sep 14 08:01 ./work/basakhi/Baisaki_14.psd
-rwxr-xr-x@ 1 mvohra  staff   1.2M Sep  4 22:10 ./work/newyear/NewYear_05.psd
-rw-r–r–  1 mvohra  staff   1.2M Nov  7  2007 ./work/diwali/shub_depavali_candles.psd
-rwxr-xr-x@ 1 mvohra  staff   1.2M Sep  4 22:10 ./work/newyear/NewYear_06.psd
-rwxr-xr-x  1 mvohra  staff   1.2M Sep  4 22:01 ./work/ganesh/Ganesh Chaturthi_01.psd
-rwxr-xr-x@ 1 mvohra  staff   1.2M Sep 14 22:25 ./work/durga/Durga_Pooja_06.psd
-rwxr-xr-x@ 1 mvohra  staff   1.2M Sep  4 22:01 ./work/ganesh/Ganesh Chaturthi_03.psd
-rwxr-xr-x@ 1 mvohra  staff   1.2M Sep  4 22:01 ./work/ganesh/Ganesh Chaturthi_10.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov 19  2007 ./work/nanak/nanak_oval.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/golden_temple.psd
-rwxr-xr-x  1 mvohra  staff   1.1M Sep  4 10:11 ./work/diwali/Diwali_08.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/man_folding_hands_happy_diwali.psd
-rw-r–r–  1 mvohra  staff   1.1M Dec 14  2007 ./work/newyear/bg_leaves.psd
-rw-r–r–  1 mvohra  staff   1.1M Dec 14  2007 ./work/newyear/simple-blue-flower.psd
-rwxr-xr-x@ 1 mvohra  staff   1.1M Sep  4 22:03 ./work/ganesh/Ganesh Chaturthi_05.psd
-rwxr-xr-x  1 mvohra  staff   1.1M Sep  4 10:11 ./work/diwali/Diwali_04.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/happy_diwali_cup_flower.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/diwali_greetings.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/happ_diwali_floral.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/subh_diwali.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/holi/colorful_diwali.psd
-rwxr-xr-x  1 mvohra  staff   1.1M Sep  4 22:16 ./work/onam/Onam_11.psd
-rw-r–r–  1 mvohra  staff   1.1M Dec 14  2007 ./work/newyear/tulip-buds.psd
-rw-r–r–  1 mvohra  staff   1.1M Nov  7  2007 ./work/diwali/diwali_wahiyee_golden_temple_lights_night.psd
-rwxr-xr-x@ 1 mvohra  staff   1.0M Sep  4 22:01 ./work/ganesh/Ganesh Chaturthi_07.psd
-rw-r–r–  1 mvohra  staff   1.0M Sep  3 12:40 ./work/nanak/eng_waheguru_bg.psd
-rwxr-xr-x@ 1 mvohra  staff   1.0M Sep  4 22:02 ./work/ganesh/Ganesh Chaturthi_06.psd
-rw-r–r–  1 mvohra  staff   1.0M Sep 13 22:33 ./work/basakhi/baisaki_10.psd
-rw-r–r–  1 mvohra  staff   1.0M Nov 18  2007 ./work/diwali/diwali_wahiyee_golden_temple.psd
-rw-r–r–  1 mvohra  staff   1.0M Aug 21 02:14 ./work/misc/choose.jpg
-rw-r–r–  1 mvohra  staff   1.0M Nov  7  2007 ./work/diwali/diwali_wahiyee_golden_temple_lights.psd
-rwxr-xr-x@ 1 mvohra  staff   1.0M Sep  4 22:00 ./work/ganesh/Ganesh Chaturthi_09.psd
-rw-r–r–  1 mvohra  staff   1.0M Dec 14  2007 ./work/newyear/cute-pglet.psd

[pb_builder]

Check Also

How to list disks information in Linux?

In order to check the disk in the system we can use the List Hardware …

Leave a Reply