Anyway to show files that are over X number of MBs?

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Is there anyway to show just files that are over X amount of MBs in a directory? (it has thousands of files but only a few are over 500 MBs and I want to see which ones)
 

elleryjh

Well-Known Member
Apr 12, 2003
479
0
166
In FTP or SCP, most software allows you to sort by size.

In SSH, use the command:

ls -lS | more

ls is the list command
l (lowercase L) makes it list detailed information
S makes it sort by size. Large files are at the top.
| more pipes it to more, so you will see the first screen of files. Then use Spacebar or Enter to scroll.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
nettigritty said:
In SSH:

find /home -size +1024k

(to find a file larger than 1MB under /home)
And use the following to find files larger than 1mb and modified in the last 3 days. This one is good when you want to find out what just took all the disk space:

Code:
find /home -size +1024k -mtime -3