Как удалить "(удаленные) файлы" в / tmp - Debian

488
bklups

На Debian 6 у меня есть эти большие файлы, которые связаны с Python

/tmp/tmpLwS5ny.tbuf (deleted) /tmp/tmpMjH6hy.tbuf (deleted) /tmp/tmpGtY5dz.tbuf (deleted) 

Я не хочу перезагружать сервер, но я должен удалить их? Как мне это сделать?

0

1 ответ на вопрос

1
Don King

You can add this script as a cron job to remove the files without rebooting

#!/bin/sh # Clean file and dirs more than 3 days old in /tmp nightly /usr/bin/find /tmp -type f -atime +2 -mtime +2 |xargs /bin/rm -f && /usr/bin/find /tmp -type d -mtime +2 -exec /bin/rm -rf '{}' \; && /usr/bin/find /tmp -type l -ctime +2 |xargs /bin/rm -f && /usr/bin/find -L /tmp -mtime +2 -print -exec rm -f {} \; 

save the contents above to a file chmod 775 the file and create a cron entry to run it

Я пытаюсь сделать это, поместив его в ночной файл sh. bklups 9 лет назад 0

Похожие вопросы