Cara Automatic Hapus File Session PHP

Use “df -i” command to view inodes usage: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda2 1310720 1310720 0 100% / That means you ran out of inodes! Most probably PHP sessions are the issue. A quick command to delete all sess_* files on /var/lib/php/sessions is this: find /var/lib/php/sessions -type f -cmin +24 -name "sess_*" -exec rm -f {} \; But I would recommend you to use a bash script, keep reading below: On your PHP.ini file ...

View More
  Dibaca 797 kali

Clear systemd journal

On any server, the logs can start to add up and take considerable amount of disk space. Systemd conveniently stores these in /var/log/journal and has a systemctl command to help clear them. Take this example: $ du -hs /var/log/journal/ 4.1G /var/log/journal/ 4.1GB worth of journal files, with the oldest dating back over 2 months. $ ls -lath /var/log/journal/*/ | tail -n 2 -rw-r-x---+ 1 root systemd-journal 8.0M Dec 24 05:15 user-xxx.journal On this server, I really don't ne ...

View More
  Dibaca 437 kali

Cara Menghapus Seluruh File Dalam Folder di Ubuntu

Dalam Kasus ingin membersihkan file sampah di tmp,log dll perlu sekali perintah dibawah ini agar tidak hapus satu persatu   rm -rf /namafolder/*Jika Perintah diatas gagal karena filenya terlalu banyak dengan error seperti dibawah ini-bash: /bin/rm: Argument list too longMaka solusinya adalah gunakan perintah dibawah inisudo find . -name 'nama_file*'| xargs rm ...

View More
  Dibaca 237 kali