1

My qbitorrent was set to preallocate files.

After a crash it lost a lot of torrents many of which were incomplete. (I purged it afterward, using deluge now)

I have a directory containing 1000s of folders and files in which I need to find the incomplete ones. I assume the filler used is 0x00, is there a simple command that would iterate over all files and echo the ones that contain 0x00's above some threshold?

After searching I found this but don't know how to complete it:

grep -P '\x00{NNN}' File
1
  • Please try my updated answer -- sorry for the first version.
    – user313992
    Oct 1, 2018 at 0:25

1 Answer 1

1
grep -rlaP '\x00{4096}' your_directory

Change 4096 to the actual length of a run of null bytes you're after.

0

You must log in to answer this question.