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?










2















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










share|improve this question






















  • 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















2















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










share|improve this question






















  • 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













2












2








2








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










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 3 hours ago









Maverick32Maverick32

725




725












  • 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

















  • 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
















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










1 Answer
1






active

oldest

votes


















1














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.






share|improve this answer


















  • 1





    Perfect!! I added du -shc * and worked exactly as i hoped. Thank you!

    – Maverick32
    2 hours ago











Your Answer








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
);



);













draft saved

draft discarded


















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









1














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.






share|improve this answer


















  • 1





    Perfect!! I added du -shc * and worked exactly as i hoped. Thank you!

    – Maverick32
    2 hours ago















1














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.






share|improve this answer


















  • 1





    Perfect!! I added du -shc * and worked exactly as i hoped. Thank you!

    – Maverick32
    2 hours ago













1












1








1







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









EliasElias

566




566







  • 1





    Perfect!! I added du -shc * and worked exactly as i hoped. Thank you!

    – Maverick32
    2 hours ago












  • 1





    Perfect!! I added du -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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Андора Зьмест Гісторыя | Палітыка | Адміністрацыйны падзел | Геаграфія | Эканоміка | Дэмаграфія | Крыніцы | Вонкавыя спасылкі | Навігацыйнае мэню"CIA World Factbook entry: Andorra"."Andorra 2008, Departament d'estadística d'Andorra"Андорарр

J. J. Abrams Índice Traxectoria | Filmografía | Premios | Notas | Véxase tamén | Menú de navegacióne"J.J. Abrams: Biography"Arquivado"'Star Trek' sequel on track"Arquivado"J.J. Abrams Producing Samurai Jack Movie"Arquivado"EXCLUSIVE: J.J. Abrams Goes Into Warp Speed with Star Trek and Beyond"Arquivado"David Semel To Direct Jonah Nolan/J.J. Abrams' CBS Pilot 'Person Of Interest'"Arquivado"Fox orders J.J. Abrams pilot 'Alcatraz'"ArquivadoJ. J. AbramsJ. J. AbramsWorldCat81800131p24091041000XX116709414031616ma11226833654496ID052246713376222X511412nm00091900000 0001 1772 5428no98124254ID0000002883100650044xx0054597000141374297344064w64f2mjx14255303415344

Сэнт-Люіс Вонкавыя спасылкі | Навігацыйнае мэню38°37′38″ пн. ш. 90°11′52″ з. д. / 38.62722° пн. ш. 90.19778° з. д. / 38.62722; -90.1977838°37′38″ пн. ш. 90°11′52″ з. д. / 38.62722° пн. ш. 90.19778° з. д. / 38.62722; -90.19778stlouis-mo.govСэнт-ЛюісAnnual Estimates of the Resident Population for Incorporated Places – U.S. Census Bureau, Population Division