Eliminating zero-length files

Posted by RhZ on Ask Ubuntu See other posts from Ask Ubuntu or by RhZ
Published on 2014-05-29T02:15:52Z Indexed on 2014/05/29 4:00 UTC
Read the original article Hit count: 228

Filed under:
|

I have been having multiple crashes recently. 4-5 last night within a few hours. I posted about it before, and got an answer but not sure how to proceed.

The messages in my logs right before the crash are multiple complaints about valid eCryptfs headers. But the chron might not be related, I don't think I saw that in previous crashes:

xxx-desktop kernel: [ 1112.274474] Valid eCryptfs headers not found in file header region or xattr region, inode 32376924
xxx-desktop CRON[4212]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

So I was sent to an answer providing this script:

for i in find $(mount | grep " on $HOME type ecryptfs" | awk '{print $1}') -size 0c; do
  if ! fuser -v $i; then
    rm -f $i
  fi

done

I did find some zero byte files, not in the exactly right place (a folder called .private as I remember), but I need to fix this, its too bad right now. So I need to delete any of them that are not in use.

I am a little too clueless, can someone walk me through executing this script? I don't know how.

© Ask Ubuntu or respective owner

Related posts about 14.04

Related posts about ecryptfs