The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    16
    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:
    16
    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:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore, India
    In SSH:

    find /home -size +1024k

    (to find a file larger than 1MB under /home)
     
  4. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    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
     
Loading...

Share This Page