Size of directories only not files The Next CEO of Stack OverflowHow to extract only pictures from html directoriesHow to exclude/delete files only?How to access files/directories with spaces in the name?Longlisting Files & Directoriescp directories and files, preserving directories and overwriting filesCan Locate command output only genuine files (not directories)How to list files from n biggest directories?How to copy only files (.wrk) from multiple directories and subfoldersThunar cannot show me folder content sizes unless I right click properties? WHY?Show total file size while transferring files?
Is it okay to majorly distort historical facts while writing a fiction story?
Should I tutor a student who I know has cheated on their homework?
What kind of palm/plant is this?
How to edit “Name” property in GCI output?
Why does standard notation not preserve intervals (visually)
Defamation due to breach of confidentiality
What was the first Unix version to run on a microcomputer?
Why do airplanes bank sharply to the right after air-to-air refueling?
What happened in Rome, when the western empire "fell"?
Does increasing your ability score affect your main stat?
When you upcast Blindness/Deafness, do all targets suffer the same effect?
Does Germany produce more waste than the US?
What is meant by "large scale tonal organization?"
How many extra stops do monopods offer for tele photographs?
Labelling, numbering and referring to a question
Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?
Decide between Polyglossia and Babel for LuaLaTeX in 2019
Can Plant Growth be repeatedly cast on the same area to exponentially increase the yield of harvests there (more than twice)?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Is the D&D universe the same as the Forgotten Realms universe?
Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis
What flight has the highest ratio of timezone difference to flight time?
Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?
Find non-case sensitive string in a mixed list of elements?
Size of directories only not files
The Next CEO of Stack OverflowHow to extract only pictures from html directoriesHow to exclude/delete files only?How to access files/directories with spaces in the name?Longlisting Files & Directoriescp directories and files, preserving directories and overwriting filesCan Locate command output only genuine files (not directories)How to list files from n biggest directories?How to copy only files (.wrk) from multiple directories and subfoldersThunar cannot show me folder content sizes unless I right click properties? WHY?Show total file size while transferring files?
This has probably been answered elsewhere but can't seem to find it and apologies for the duplicate/basic question.
I want to simply be able to display the file size of folders in a directory.
Running du -h lists all the folders but it also includes files in the directory. I'd prefer it to display similar to the below...
Documents Size mb
Temp Size mb
Pictures Size mb
Videos Size mb
Total size
Bonus if i could get the total at the end included. Is the possible through a simple command?
Thanks
command-line 18.04 files filesystem
add a comment |
This has probably been answered elsewhere but can't seem to find it and apologies for the duplicate/basic question.
I want to simply be able to display the file size of folders in a directory.
Running du -h lists all the folders but it also includes files in the directory. I'd prefer it to display similar to the below...
Documents Size mb
Temp Size mb
Pictures Size mb
Videos Size mb
Total size
Bonus if i could get the total at the end included. Is the possible through a simple command?
Thanks
command-line 18.04 files filesystem
du -h -c -d0 Downloads/*/lists the size of all directories inDownloadsalso includes total.
– Ravexina
3 hours ago
Thank you!!! I useddu -shc *which worked perfectly with your help.
– Maverick32
2 hours ago
add a comment |
This has probably been answered elsewhere but can't seem to find it and apologies for the duplicate/basic question.
I want to simply be able to display the file size of folders in a directory.
Running du -h lists all the folders but it also includes files in the directory. I'd prefer it to display similar to the below...
Documents Size mb
Temp Size mb
Pictures Size mb
Videos Size mb
Total size
Bonus if i could get the total at the end included. Is the possible through a simple command?
Thanks
command-line 18.04 files filesystem
This has probably been answered elsewhere but can't seem to find it and apologies for the duplicate/basic question.
I want to simply be able to display the file size of folders in a directory.
Running du -h lists all the folders but it also includes files in the directory. I'd prefer it to display similar to the below...
Documents Size mb
Temp Size mb
Pictures Size mb
Videos Size mb
Total size
Bonus if i could get the total at the end included. Is the possible through a simple command?
Thanks
command-line 18.04 files filesystem
command-line 18.04 files filesystem
asked 3 hours ago
Maverick32Maverick32
725
725
du -h -c -d0 Downloads/*/lists the size of all directories inDownloadsalso includes total.
– Ravexina
3 hours ago
Thank you!!! I useddu -shc *which worked perfectly with your help.
– Maverick32
2 hours ago
add a comment |
du -h -c -d0 Downloads/*/lists the size of all directories inDownloadsalso includes total.
– Ravexina
3 hours ago
Thank you!!! I useddu -shc *which worked perfectly with your help.
– Maverick32
2 hours ago
du -h -c -d0 Downloads/*/ lists the size of all directories in Downloads also includes total.– Ravexina
3 hours ago
du -h -c -d0 Downloads/*/ lists the size of all directories in Downloads also includes total.– Ravexina
3 hours ago
Thank you!!! I used
du -shc * which worked perfectly with your help.– Maverick32
2 hours ago
Thank you!!! I used
du -shc * which worked perfectly with your help.– Maverick32
2 hours ago
add a comment |
1 Answer
1
active
oldest
votes
Try this:
du -sh *
The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.
1
Perfect!! I addeddu -shc *and worked exactly as i hoped. Thank you!
– Maverick32
2 hours ago
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f1130092%2fsize-of-directories-only-not-files%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
Try this:
du -sh *
The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.
1
Perfect!! I addeddu -shc *and worked exactly as i hoped. Thank you!
– Maverick32
2 hours ago
add a comment |
Try this:
du -sh *
The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.
1
Perfect!! I addeddu -shc *and worked exactly as i hoped. Thank you!
– Maverick32
2 hours ago
add a comment |
Try this:
du -sh *
The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.
Try this:
du -sh *
The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.
answered 2 hours ago
EliasElias
566
566
1
Perfect!! I addeddu -shc *and worked exactly as i hoped. Thank you!
– Maverick32
2 hours ago
add a comment |
1
Perfect!! I addeddu -shc *and worked exactly as i hoped. Thank you!
– Maverick32
2 hours ago
1
1
Perfect!! I added
du -shc * and worked exactly as i hoped. Thank you!– Maverick32
2 hours ago
Perfect!! I added
du -shc * and worked exactly as i hoped. Thank you!– Maverick32
2 hours ago
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1130092%2fsize-of-directories-only-not-files%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

du -h -c -d0 Downloads/*/lists the size of all directories inDownloadsalso includes total.– Ravexina
3 hours ago
Thank you!!! I used
du -shc *which worked perfectly with your help.– Maverick32
2 hours ago