Why are du -h / du / df / df -h not refreshing when extracting a large file
I am running tar in the background, eg:
tar xfvz large_file.tar.gz &
It does extract my file, but when I then launch du -h, du, df or df -h, the output remains the same, and I have to wait few minutes for it to refresh.
Is there any workaround? That's not really a problem, I am asking this for my own Unix culture about du & df & so on.
filesystems mount kernel disk-usage
add a comment |
I am running tar in the background, eg:
tar xfvz large_file.tar.gz &
It does extract my file, but when I then launch du -h, du, df or df -h, the output remains the same, and I have to wait few minutes for it to refresh.
Is there any workaround? That's not really a problem, I am asking this for my own Unix culture about du & df & so on.
filesystems mount kernel disk-usage
add a comment |
I am running tar in the background, eg:
tar xfvz large_file.tar.gz &
It does extract my file, but when I then launch du -h, du, df or df -h, the output remains the same, and I have to wait few minutes for it to refresh.
Is there any workaround? That's not really a problem, I am asking this for my own Unix culture about du & df & so on.
filesystems mount kernel disk-usage
I am running tar in the background, eg:
tar xfvz large_file.tar.gz &
It does extract my file, but when I then launch du -h, du, df or df -h, the output remains the same, and I have to wait few minutes for it to refresh.
Is there any workaround? That's not really a problem, I am asking this for my own Unix culture about du & df & so on.
filesystems mount kernel disk-usage
filesystems mount kernel disk-usage
edited Dec 12 at 8:37
Kusalananda
121k16228372
121k16228372
asked Dec 12 at 8:25
user325489
182
182
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Probably the data has not actually been written to disk yet but is still in the page cache ("dirty pages"). Check with
grep Dirty /proc/meminfo
You can try to run sync before df/du. That should force any data in the page cache to be written to disk.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487519%2fwhy-are-du-h-du-df-df-h-not-refreshing-when-extracting-a-large-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Probably the data has not actually been written to disk yet but is still in the page cache ("dirty pages"). Check with
grep Dirty /proc/meminfo
You can try to run sync before df/du. That should force any data in the page cache to be written to disk.
add a comment |
Probably the data has not actually been written to disk yet but is still in the page cache ("dirty pages"). Check with
grep Dirty /proc/meminfo
You can try to run sync before df/du. That should force any data in the page cache to be written to disk.
add a comment |
Probably the data has not actually been written to disk yet but is still in the page cache ("dirty pages"). Check with
grep Dirty /proc/meminfo
You can try to run sync before df/du. That should force any data in the page cache to be written to disk.
Probably the data has not actually been written to disk yet but is still in the page cache ("dirty pages"). Check with
grep Dirty /proc/meminfo
You can try to run sync before df/du. That should force any data in the page cache to be written to disk.
edited Dec 12 at 19:47
Kusalananda
121k16228372
121k16228372
answered Dec 12 at 19:44
WerKater
713
713
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487519%2fwhy-are-du-h-du-df-df-h-not-refreshing-when-extracting-a-large-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown