Skip to main content

How can I see in SSH the list of files in /tmp?

Comments

2 comments

  • Spirogg
    One of my clients was able to enable me to activate the PHP.exif extension and I have noticed that since then in server state the /tmp folder fills up every day. I would like to know why that folder fills up every day, maybe with an SSH command I can see the list of files. Greetings.

    you can try find /tmp or find /var/tmp or what ever path your /tmp folder is in. or you can cd /tmp cd /var/tmp or cd /path/to/your/tmp then once you are at [root@yourserver tmp]# you type in ls or dir this will give you a list of all files in that directory
    0
  • cagsmith
    It sounds like you have the session.save_path configured to /tmp in php.ini It should be set probably to one of the following: Alt PHP (CloudLinux): /opt/alt/php74/var/lib/php/session EA PHP (cPanel default): /var/cpanel/php/sessions/ea-php74 The second one I think is correct, although could be wrong - you'll need to check. The version will need to be changed if you're not using PHP 7.4. Those should then get purged of session files automatically, although you can always create a cron to purge those - if I recall correctly they all follow the name template of: sess_XYZ, where "XYZ" is a long string of numbers and possibly letters a-f
    0

Please sign in to leave a comment.