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!

How to see which files are being written to?

Discussion in 'General Discussion' started by nothsa, Aug 19, 2005.

  1. nothsa

    nothsa Well-Known Member

    Nov 30, 2004
    Likes Received:
    Trophy Points:
    I have a high disk I/O on one of my drives and am wanting to move files/folders that are written to often to another drive, and symlink them on the original drive. My only problem is that I don't know which files/folders are being written to the most.

    Is there any way that I can find this out?
  2. brianoz

    brianoz Well-Known Member

    Mar 13, 2004
    Likes Received:
    Trophy Points:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Use the lsof utility. It may not be installed, you may have to use yum or similar to install it.

    lsof has a host of options and can tell you exactly which files are open by reading kernel tables.

    Another option that may be simpler is to use "find":
    find /filesystem -mmin -60
    which will display all files modified in the last 60 minutes. (You can also use "find /filesystem -mtime -1" with older versions of find, but that shows all files modified in the last 24 hours).
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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