# Managing the inode count

> What an inode count is, how to check how many files your hosting account has, and how to find and remove folders with too many files.

Source: https://helpcenter.ruachost.com/developers/linux/managing-the-inode-count/

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.

> **Note:**
Ruachost doesn't set a separate limit on the number of files (inodes) in your account. The only storage limit is your plan's **disk space**. See [My hosting account is out of disk space](https://helpcenter.ruachost.com/getting-started/website-troubleshooting/hosting-account-out-of-disk-space/).

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

### 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

1. Connect to your account over SSH, or open **Terminal** in cPanel. See [How to use SSH](https://helpcenter.ruachost.com/cpanel/guides/how-to-use-ssh-secure-shell-on-windows-and-mac-to-access-your-account/).
2. Go to your home folder and count everything in it:

   ```bash
   cd ~
   find . | wc -l
   ```

3. See which top-level folders have the most files:

   ```bash
   for d in */ .[!.]*/; do printf "%8d  %s\n" "$(find "$d" | wc -l)" "$d"; done | sort -rn | head -20
   ```

   Go into the biggest folder (for example `cd public_html`) and run the same command again to narrow it down.

## 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's `sessions` or `cache` folders.
- **Backups:** old backups made by plugins or Softaculous in `public_html` or `softaculous_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](https://helpcenter.ruachost.com/cpanel/advanced/setting-up-cron-jobs-in-cpanel/).
- **Unused apps:** test or old copies of websites you no longer need.

> **Tip:**
To find folders using the most **space** (rather than the most files), see [Determining high disk usage locations](https://helpcenter.ruachost.com/developers/linux/determining-high-disk-usage-locations/).

## Related articles

- [Viewing disk usage information in cPanel](https://helpcenter.ruachost.com/cpanel/files/viewing-disk-usage-information-in-cpanel/)
- [My hosting account is out of disk space](https://helpcenter.ruachost.com/getting-started/website-troubleshooting/hosting-account-out-of-disk-space/)
