Find files that contain filler (0x00)
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
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 'x00NNN' File
grep find search
add a comment |Â
up vote
0
down vote
favorite
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 'x00NNN' File
grep find search
Please try my updated answer -- sorry for the first version.
â mosvy
Oct 1 at 0:25
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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 'x00NNN' File
grep find search
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 'x00NNN' File
grep find search
grep find search
edited Sep 30 at 23:54
asked Sep 30 at 23:44
user313572
Please try my updated answer -- sorry for the first version.
â mosvy
Oct 1 at 0:25
add a comment |Â
Please try my updated answer -- sorry for the first version.
â mosvy
Oct 1 at 0:25
Please try my updated answer -- sorry for the first version.
â mosvy
Oct 1 at 0:25
Please try my updated answer -- sorry for the first version.
â mosvy
Oct 1 at 0:25
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
grep -rlaP 'x004096' your_directory
Change 4096
to the actual length of a run of null bytes you're after.
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
grep -rlaP 'x004096' your_directory
Change 4096
to the actual length of a run of null bytes you're after.
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
add a comment |Â
up vote
1
down vote
accepted
grep -rlaP 'x004096' your_directory
Change 4096
to the actual length of a run of null bytes you're after.
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
grep -rlaP 'x004096' your_directory
Change 4096
to the actual length of a run of null bytes you're after.
grep -rlaP 'x004096' your_directory
Change 4096
to the actual length of a run of null bytes you're after.
edited Oct 1 at 0:24
answered Oct 1 at 0:06
mosvy
1,837110
1,837110
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
add a comment |Â
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
This is perfect, works. Thanks.
â user313572
Oct 1 at 0:53
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f472471%2ffind-files-that-contain-filler-0x00%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Please try my updated answer -- sorry for the first version.
â mosvy
Oct 1 at 0:25