Managing the inode count
Ce contenu n’est pas encore disponible dans votre langue.
An inode is how Linux keeps track of each file and folder. Your account’s inode count is simply the total number of files and folders in it: every email, image, cache file and folder adds one.
Even so, it’s worth keeping the file count down. Hundreds of thousands of small files make backups and restores slower, can slow down your website, and usually mean something is creating files it shouldn’t, such as a cache that’s never cleared or a script stuck in a loop.
Check your inode count
Section titled “Check your inode count”In cPanel
Section titled “In cPanel”Log in to cPanel and look at File Usage in the Statistics panel on the right of the home screen. It shows how many files and folders your account has.
From the command line
Section titled “From the command line”-
Connect to your account over SSH, or open Terminal in cPanel. See How to use SSH.
-
Go to your home folder and count everything in it:
Terminal window cd ~find . | wc -l -
See which top-level folders have the most files:
Terminal window for d in */ .[!.]*/; do printf "%8d %s\n" "$(find "$d" | wc -l)" "$d"; done | sort -rn | head -20Go into the biggest folder (for example
cd public_html) and run the same command again to narrow it down.
Common causes and fixes
Section titled “Common causes and fixes”- Website cache: caching plugins such as LiteSpeed Cache can create many thousands of files. Purge the cache from the plugin, and check it isn’t set to keep cache files forever.
- Old email: messages in Trash, Spam and Sent folders all count. Empty them, or set Trash and Spam to clear automatically in webmail.
- Sessions and temporary files: look in
tmp/and in your app’ssessionsorcachefolders. - Backups: old backups made by plugins or Softaculous in
public_htmlorsoftaculous_backups. Download any you need, then delete them. - Scripts or cron jobs that create files: a cron job that saves output to a new file every run, or a script that writes a log file per visit. Change it to overwrite or rotate the file instead. See Setting up cron jobs in cPanel.
- Unused apps: test or old copies of websites you no longer need.
Related articles
Section titled “Related articles”Cette page vous a-t-elle aidé ?
Merci pour votre retour.