Zip/Tar file compressed to larger size?What does size of a directory mean in output of 'ls -l' command?Is there a command to list the compressed file sizes for files within a .zip file?Why can't tar extract .zip files?Unpack file compressed in .txz and .tar with one commandBash script to get the result from rsync transfer and zip it as a directory in the original directorytar extract into directory with same base name?why would you tar a zip fileWhy does `zip` in a for loop work when the file exists, but not when it doesn't?rsync-like updating of archive filetar: Potential bug (?) when incremental archive selected - Deleting files in the targetzip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target

How did the Super Star Destroyer Executor get destroyed exactly?

Mathematica command that allows it to read my intentions

How does a predictive coding aid in lossless compression?

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Can my sorcerer use a spellbook only to collect spells and scribe scrolls, not cast?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

In 'Revenger,' what does 'cove' come from?

Why can't we play rap on piano?

How much of data wrangling is a data scientist's job?

Examples of smooth manifolds admitting inbetween one and a continuum of complex structures

Can I run a new neutral wire to repair a broken circuit?

How can I determine if the org that I'm currently connected to is a scratch org?

Arrow those variables!

How to Recreate this in LaTeX? (Unsure What the Notation is Called)

Can we compute the area of a quadrilateral with one right angle when we only know the lengths of any three sides?

All in one piece, we mend holes in your socks

How to prevent "they're falling in love" trope

How badly should I try to prevent a user from XSSing themselves?

Why didn't Boeing produce its own regional jet?

Can a virus destroy the BIOS of a modern computer?

Avoiding direct proof while writing proof by induction

Why is consensus so controversial in Britain?

How do I handle a potential work/personal life conflict as the manager of one of my friends?

Size of subfigure fitting its content (tikzpicture)



Zip/Tar file compressed to larger size?


What does size of a directory mean in output of 'ls -l' command?Is there a command to list the compressed file sizes for files within a .zip file?Why can't tar extract .zip files?Unpack file compressed in .txz and .tar with one commandBash script to get the result from rsync transfer and zip it as a directory in the original directorytar extract into directory with same base name?why would you tar a zip fileWhy does `zip` in a for loop work when the file exists, but not when it doesn't?rsync-like updating of archive filetar: Potential bug (?) when incremental archive selected - Deleting files in the targetzip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target













2















I have 4 files that I want to include them in a .zip file.



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


As you can see in total they size 32K.



After



I am creating the zip using the command bellow:



zip -r myfiles.zip *


The file was created successfully but now its size is 20M, as you can see bellow!



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
-rw-rw-r-- 1 skemelio themelis 20M Απρ 4 02:00 myfiles.zip
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


What I've done wrong?



ps: Same thing (same size) happened when I try to create a .tar using tar cvf myfiles.tar *.










share|improve this question









New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    A individual directory always shows the 4k size when viewed with ls - what you want to use to check before is du - ie, du -sh *

    – ivanivan
    5 hours ago






  • 1





    Ok I had no idea why this happens but you are right. Why don't you make it an answer?

    – Themelis
    5 hours ago






  • 1





    Possible duplicate of What does size of a directory mean in output of 'ls -l' command?

    – Fabby
    4 hours ago











  • FYI, 4K * 4 = 16K, not 32K. Also, in this case this is due to a misunderstanding of the size that ls reports for directories (that each directory was the exactly the same size should have been a hint that maybe ls isn't reporting what you think), but in general you should not necessarily be surprised if compression sometimes produces a larger file. Compression can't compress everything; otherwise you could repeatedly run zip on a .zip file to get increasingly smaller files.

    – jamesdlin
    3 mins ago















2















I have 4 files that I want to include them in a .zip file.



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


As you can see in total they size 32K.



After



I am creating the zip using the command bellow:



zip -r myfiles.zip *


The file was created successfully but now its size is 20M, as you can see bellow!



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
-rw-rw-r-- 1 skemelio themelis 20M Απρ 4 02:00 myfiles.zip
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


What I've done wrong?



ps: Same thing (same size) happened when I try to create a .tar using tar cvf myfiles.tar *.










share|improve this question









New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    A individual directory always shows the 4k size when viewed with ls - what you want to use to check before is du - ie, du -sh *

    – ivanivan
    5 hours ago






  • 1





    Ok I had no idea why this happens but you are right. Why don't you make it an answer?

    – Themelis
    5 hours ago






  • 1





    Possible duplicate of What does size of a directory mean in output of 'ls -l' command?

    – Fabby
    4 hours ago











  • FYI, 4K * 4 = 16K, not 32K. Also, in this case this is due to a misunderstanding of the size that ls reports for directories (that each directory was the exactly the same size should have been a hint that maybe ls isn't reporting what you think), but in general you should not necessarily be surprised if compression sometimes produces a larger file. Compression can't compress everything; otherwise you could repeatedly run zip on a .zip file to get increasingly smaller files.

    – jamesdlin
    3 mins ago













2












2








2








I have 4 files that I want to include them in a .zip file.



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


As you can see in total they size 32K.



After



I am creating the zip using the command bellow:



zip -r myfiles.zip *


The file was created successfully but now its size is 20M, as you can see bellow!



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
-rw-rw-r-- 1 skemelio themelis 20M Απρ 4 02:00 myfiles.zip
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


What I've done wrong?



ps: Same thing (same size) happened when I try to create a .tar using tar cvf myfiles.tar *.










share|improve this question









New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have 4 files that I want to include them in a .zip file.



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


As you can see in total they size 32K.



After



I am creating the zip using the command bellow:



zip -r myfiles.zip *


The file was created successfully but now its size is 20M, as you can see bellow!



drwxr-xr-x 7 skemelio themelis 4,0K Οκτ 18 00:21 CSharp
drwxr-xr-x 11 skemelio themelis 4,0K Οκτ 18 00:17 gnome-games
drwxr-xr-x 8 skemelio themelis 4,0K Οκτ 18 00:17 gnome-music
-rw-rw-r-- 1 skemelio themelis 20M Απρ 4 02:00 myfiles.zip
drwxr-xr-x 4 skemelio themelis 4,0K Οκτ 18 00:18 Test


What I've done wrong?



ps: Same thing (same size) happened when I try to create a .tar using tar cvf myfiles.tar *.







tar zip compression






share|improve this question









New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 3 hours ago









Rui F Ribeiro

41.9k1483142




41.9k1483142






New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









ThemelisThemelis

1163




1163




New contributor




Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Themelis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 1





    A individual directory always shows the 4k size when viewed with ls - what you want to use to check before is du - ie, du -sh *

    – ivanivan
    5 hours ago






  • 1





    Ok I had no idea why this happens but you are right. Why don't you make it an answer?

    – Themelis
    5 hours ago






  • 1





    Possible duplicate of What does size of a directory mean in output of 'ls -l' command?

    – Fabby
    4 hours ago











  • FYI, 4K * 4 = 16K, not 32K. Also, in this case this is due to a misunderstanding of the size that ls reports for directories (that each directory was the exactly the same size should have been a hint that maybe ls isn't reporting what you think), but in general you should not necessarily be surprised if compression sometimes produces a larger file. Compression can't compress everything; otherwise you could repeatedly run zip on a .zip file to get increasingly smaller files.

    – jamesdlin
    3 mins ago












  • 1





    A individual directory always shows the 4k size when viewed with ls - what you want to use to check before is du - ie, du -sh *

    – ivanivan
    5 hours ago






  • 1





    Ok I had no idea why this happens but you are right. Why don't you make it an answer?

    – Themelis
    5 hours ago






  • 1





    Possible duplicate of What does size of a directory mean in output of 'ls -l' command?

    – Fabby
    4 hours ago











  • FYI, 4K * 4 = 16K, not 32K. Also, in this case this is due to a misunderstanding of the size that ls reports for directories (that each directory was the exactly the same size should have been a hint that maybe ls isn't reporting what you think), but in general you should not necessarily be surprised if compression sometimes produces a larger file. Compression can't compress everything; otherwise you could repeatedly run zip on a .zip file to get increasingly smaller files.

    – jamesdlin
    3 mins ago







1




1





A individual directory always shows the 4k size when viewed with ls - what you want to use to check before is du - ie, du -sh *

– ivanivan
5 hours ago





A individual directory always shows the 4k size when viewed with ls - what you want to use to check before is du - ie, du -sh *

– ivanivan
5 hours ago




1




1





Ok I had no idea why this happens but you are right. Why don't you make it an answer?

– Themelis
5 hours ago





Ok I had no idea why this happens but you are right. Why don't you make it an answer?

– Themelis
5 hours ago




1




1





Possible duplicate of What does size of a directory mean in output of 'ls -l' command?

– Fabby
4 hours ago





Possible duplicate of What does size of a directory mean in output of 'ls -l' command?

– Fabby
4 hours ago













FYI, 4K * 4 = 16K, not 32K. Also, in this case this is due to a misunderstanding of the size that ls reports for directories (that each directory was the exactly the same size should have been a hint that maybe ls isn't reporting what you think), but in general you should not necessarily be surprised if compression sometimes produces a larger file. Compression can't compress everything; otherwise you could repeatedly run zip on a .zip file to get increasingly smaller files.

– jamesdlin
3 mins ago





FYI, 4K * 4 = 16K, not 32K. Also, in this case this is due to a misunderstanding of the size that ls reports for directories (that each directory was the exactly the same size should have been a hint that maybe ls isn't reporting what you think), but in general you should not necessarily be surprised if compression sometimes produces a larger file. Compression can't compress everything; otherwise you could repeatedly run zip on a .zip file to get increasingly smaller files.

– jamesdlin
3 mins ago










1 Answer
1






active

oldest

votes


















4














An individual directory always shows a false size when viewed with ls - what you want to use to check before is du - ie, du -sh *.



A good explanation of what the size of a directory means is on this Q&A - What does size of a directory mean in output of 'ls -l' command?






share|improve this answer

























  • The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

    – icarus
    39 mins ago











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



);






Themelis is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510386%2fzip-tar-file-compressed-to-larger-size%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









4














An individual directory always shows a false size when viewed with ls - what you want to use to check before is du - ie, du -sh *.



A good explanation of what the size of a directory means is on this Q&A - What does size of a directory mean in output of 'ls -l' command?






share|improve this answer

























  • The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

    – icarus
    39 mins ago















4














An individual directory always shows a false size when viewed with ls - what you want to use to check before is du - ie, du -sh *.



A good explanation of what the size of a directory means is on this Q&A - What does size of a directory mean in output of 'ls -l' command?






share|improve this answer

























  • The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

    – icarus
    39 mins ago













4












4








4







An individual directory always shows a false size when viewed with ls - what you want to use to check before is du - ie, du -sh *.



A good explanation of what the size of a directory means is on this Q&A - What does size of a directory mean in output of 'ls -l' command?






share|improve this answer















An individual directory always shows a false size when viewed with ls - what you want to use to check before is du - ie, du -sh *.



A good explanation of what the size of a directory means is on this Q&A - What does size of a directory mean in output of 'ls -l' command?







share|improve this answer














share|improve this answer



share|improve this answer








edited 1 hour ago









slm

255k71539687




255k71539687










answered 4 hours ago









ivanivanivanivan

3,7571414




3,7571414












  • The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

    – icarus
    39 mins ago

















  • The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

    – icarus
    39 mins ago
















The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

– icarus
39 mins ago





The size show by ls for a directory is not false, it is the size of the directory. However the size of a directory is related to the number of entries in it (possibly the largest number it every had), not the size of those entries.

– icarus
39 mins ago










Themelis is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Themelis is a new contributor. Be nice, and check out our Code of Conduct.












Themelis is a new contributor. Be nice, and check out our Code of Conduct.











Themelis is a new contributor. Be nice, and check out our Code of Conduct.














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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510386%2fzip-tar-file-compressed-to-larger-size%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

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її