How to defragment files in size less than 100MB only in ext4 filesystem

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a very basic idea:
I would like to defragment files in size less than 100MB only in ext4 filesystem.
Since there is no option for that in the defragmentation tool (e4defrag), any ideas how I could achieve that?
I know only how to find those files:
find / -type f -size -100M
Reason for such action:
I had a system with 99.x% of the fs occupied, I freed the space now, leaving many files fragmented.
ext4 defragmentation
add a comment |Â
up vote
0
down vote
favorite
I have a very basic idea:
I would like to defragment files in size less than 100MB only in ext4 filesystem.
Since there is no option for that in the defragmentation tool (e4defrag), any ideas how I could achieve that?
I know only how to find those files:
find / -type f -size -100M
Reason for such action:
I had a system with 99.x% of the fs occupied, I freed the space now, leaving many files fragmented.
ext4 defragmentation
First check to see if de-fragmentation needs doing.extfile systems don't get as fragmented asfatorntfs. About the only scenario that causes excessive fragmentation slowly appending to a file (and even this is reduced byext. So if your partition is mostly log files, then it may fragment. To mitigate this, as part of log rotation, zip the older logs. This will, as well as saving space, de-frag the files.
â ctrl-alt-delor
Jan 24 at 10:14
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a very basic idea:
I would like to defragment files in size less than 100MB only in ext4 filesystem.
Since there is no option for that in the defragmentation tool (e4defrag), any ideas how I could achieve that?
I know only how to find those files:
find / -type f -size -100M
Reason for such action:
I had a system with 99.x% of the fs occupied, I freed the space now, leaving many files fragmented.
ext4 defragmentation
I have a very basic idea:
I would like to defragment files in size less than 100MB only in ext4 filesystem.
Since there is no option for that in the defragmentation tool (e4defrag), any ideas how I could achieve that?
I know only how to find those files:
find / -type f -size -100M
Reason for such action:
I had a system with 99.x% of the fs occupied, I freed the space now, leaving many files fragmented.
ext4 defragmentation
edited Jan 24 at 11:54
Rui F Ribeiro
35.2k1270113
35.2k1270113
asked Jan 24 at 9:22
Vlastimil
6,4011146119
6,4011146119
First check to see if de-fragmentation needs doing.extfile systems don't get as fragmented asfatorntfs. About the only scenario that causes excessive fragmentation slowly appending to a file (and even this is reduced byext. So if your partition is mostly log files, then it may fragment. To mitigate this, as part of log rotation, zip the older logs. This will, as well as saving space, de-frag the files.
â ctrl-alt-delor
Jan 24 at 10:14
add a comment |Â
First check to see if de-fragmentation needs doing.extfile systems don't get as fragmented asfatorntfs. About the only scenario that causes excessive fragmentation slowly appending to a file (and even this is reduced byext. So if your partition is mostly log files, then it may fragment. To mitigate this, as part of log rotation, zip the older logs. This will, as well as saving space, de-frag the files.
â ctrl-alt-delor
Jan 24 at 10:14
First check to see if de-fragmentation needs doing.
ext file systems don't get as fragmented as fat or ntfs. About the only scenario that causes excessive fragmentation slowly appending to a file (and even this is reduced by ext. So if your partition is mostly log files, then it may fragment. To mitigate this, as part of log rotation, zip the older logs. This will, as well as saving space, de-frag the files.â ctrl-alt-delor
Jan 24 at 10:14
First check to see if de-fragmentation needs doing.
ext file systems don't get as fragmented as fat or ntfs. About the only scenario that causes excessive fragmentation slowly appending to a file (and even this is reduced by ext. So if your partition is mostly log files, then it may fragment. To mitigate this, as part of log rotation, zip the older logs. This will, as well as saving space, de-frag the files.â ctrl-alt-delor
Jan 24 at 10:14
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I was a hair away from a solution:
sudo find / -type f -size -100M -exec e4defrag +
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
1
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
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
I was a hair away from a solution:
sudo find / -type f -size -100M -exec e4defrag +
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
1
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
add a comment |Â
up vote
1
down vote
accepted
I was a hair away from a solution:
sudo find / -type f -size -100M -exec e4defrag +
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
1
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I was a hair away from a solution:
sudo find / -type f -size -100M -exec e4defrag +
I was a hair away from a solution:
sudo find / -type f -size -100M -exec e4defrag +
edited Feb 12 at 9:52
answered Jan 24 at 9:38
Vlastimil
6,4011146119
6,4011146119
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
1
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
add a comment |Â
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
1
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
So mark your answer as the correct solution.
â wurtel
Jan 24 at 9:52
1
1
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
@wurtel As you should know, I can do that after 2 days period passes.
â Vlastimil
Jan 24 at 9:53
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
you'll want to exclude at least /proc, /sys, and /dev from that. probably /tmp too.
â cas
Jan 25 at 0:47
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%2f419294%2fhow-to-defragment-files-in-size-less-than-100mb-only-in-ext4-filesystem%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
First check to see if de-fragmentation needs doing.
extfile systems don't get as fragmented asfatorntfs. About the only scenario that causes excessive fragmentation slowly appending to a file (and even this is reduced byext. So if your partition is mostly log files, then it may fragment. To mitigate this, as part of log rotation, zip the older logs. This will, as well as saving space, de-frag the files.â ctrl-alt-delor
Jan 24 at 10:14