Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'General Discussion' started by Jeff75, Apr 24, 2006.

  1. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    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)
     
  2. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    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.
     
  3. nettigritty

    nettigritty Well-Known Member
    PartnerNOC

    Joined:
    Jan 21, 2004
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Bangalore, India
    In SSH:

    find /home -size +1024k

    (to find a file larger than 1MB under /home)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    168
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice