Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default how to find large files using command line linux?

    OK, I confess, this question has zero to do with cPanel/WHM...

    We've got a local linux dev server that is running out of space big time. Something is chewing up drive space. What linux command lines and options are my friend in identifying where my space is being chewed up? 'df' tells me that /var is 97% used, but what can I do to learn most efficiently which files in /var are the culprits?

    Thanks.
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  2. #2
    Member serversphere's Avatar
    Join Date
    Jan 2004
    Posts
    658

    Default

    Code:
    find '/' -size +50000k
    replacing 50000k with whatever size you would be lookin' for, and the '/' with the appropriate directory...

    edit: sry, posted above solely based on your msg subject. If you want to know about only the /var directory you could use above with '/var' in place of '/', however I would look at your logs directory and see what in there is or isnt' being rotated. First guess is that your logs are growing out of control. GL!
    Last edited by serversphere; 08-28-2006 at 09:36 AM.

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yup, I'd guess logs and mysql databases as the most common cause. Using du is your best bet.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  4. #4
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default

    Thanks guys. I got a good result from

    du -sh /var/*

    Turned out that log level setting in smb.conf (Samba) was set to '3' which results in huge log files been written. Changed it to 1 (0 is 'off' I believe), deleted historical logs, all good.
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

Similar Threads & Tags
Similar threads

  1. Linux shell command to backup configuration files
    By postcd in forum New User Questions
    Replies: 1
    Last Post: 03-22-2011, 09:12 AM
  2. Add email address using linux command line
    By classywear in forum E-mail Discussions
    Replies: 6
    Last Post: 08-27-2009, 10:37 AM
  3. Linux command to help find disk usage culprit?
    By sneader in forum New User Questions
    Replies: 2
    Last Post: 04-18-2009, 05:17 PM
  4. Is there a way to find the owner of a resold account through the command line?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-16-2009, 03:20 PM
  5. command to find and replace a word in files directory wide
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-09-2006, 02:40 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube