Clear Deleted File Queue

27Apr15

masih menjadi misteri kadang disk di linux full padahal banyak file sudah didelete, ternyata dalam linux ada proses queue untuk mendelete bersih sebuah file yang dihapus.

untuk melihat file yang sedang queue bisa jalankan perintah berikut :

#lsof | grep deleted

namun jika tidak ingin menunggu bisa jalankan script berikut :

#lsof | grep “(deleted)$” | sed -re ‘s/^\S+\s+(\S+)\s+\S+\s+([0-9]+).*/\1\/fd\/\2/’ | while read file; do sudo bash -c “: > /proc/$file”; done

taraaaaa.. satu misteri di dunia ini terpecahkan…



No Responses Yet to “Clear Deleted File Queue”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: