Zip/Tar file compressed to larger size? [duplicate]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?Mount compressed tar file and update itWhy 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 directorywhy would you tar a zip fileAdding compression to .tar file?rsync-like updating of archive fileExtracting specific file(s) from tar compressed directory?zip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target

Ideas for colorfully and clearly highlighting graph edges according to weights

How to create a consistant feel for character names in a fantasy setting?

Patience, young "Padovan"

Finding files for which a command fails

Why does this relative pronoun not take the case of the noun it is referring to?

Does a dangling wire really electrocute me if I'm standing in water?

Why do we use polarized capacitors?

What is the command to reset a PC without deleting any files

What is the offset in a seaplane's hull?

Domain expired, GoDaddy holds it and is asking more money

Latin words with no plurals in English

How many letters suffice to construct words with no repetition?

Is there a way to make member function NOT callable from constructor?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Does the average primeness of natural numbers tend to zero?

Is repealing the EU Withdrawal Act a precondition of revoking Article 50?

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Shall I use personal or official e-mail account when registering to external websites for work purpose?

Can I legally use front facing blue light in the UK?

Mapping arrows in commutative diagrams

Lied on resume at previous job

Copycat chess is back

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?



Zip/Tar file compressed to larger size? [duplicate]


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?Mount compressed tar file and update itWhy 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 directorywhy would you tar a zip fileAdding compression to .tar file?rsync-like updating of archive fileExtracting specific file(s) from tar compressed directory?zip command show warnings “name not matched” about symlinks, outside of my working directory, pointing to non-existing target






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4
















This question already has an answer here:



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

    4 answers



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 their size is 16K.



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.











marked as duplicate by Fabby, muru, Prvt_Yadv, Toby Speight, Mr Shunz Apr 4 at 10:40


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 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
    Apr 3 at 23:08






  • 1





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

    – Themelis
    Apr 3 at 23:10






  • 1





    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
    Apr 4 at 4:35






  • 1





    "I have 4 files..." - No, you don't. You have 4 directories which makes all the difference here.

    – mastov
    Apr 4 at 8:30






  • 1





    @Themelis I stand corrected. They are "files", they are just not "regular files", which is important here.

    – mastov
    Apr 4 at 11:01

















4
















This question already has an answer here:



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

    4 answers



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 their size is 16K.



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.











marked as duplicate by Fabby, muru, Prvt_Yadv, Toby Speight, Mr Shunz Apr 4 at 10:40


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 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
    Apr 3 at 23:08






  • 1





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

    – Themelis
    Apr 3 at 23:10






  • 1





    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
    Apr 4 at 4:35






  • 1





    "I have 4 files..." - No, you don't. You have 4 directories which makes all the difference here.

    – mastov
    Apr 4 at 8:30






  • 1





    @Themelis I stand corrected. They are "files", they are just not "regular files", which is important here.

    – mastov
    Apr 4 at 11:01













4












4








4









This question already has an answer here:



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

    4 answers



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 their size is 16K.



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.













This question already has an answer here:



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

    4 answers



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 their size is 16K.



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 *.





This question already has an answer here:



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

    4 answers







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 Apr 4 at 7:45









Stanowczo

1033




1033






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 Apr 3 at 23:04









ThemelisThemelis

1314




1314




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.




marked as duplicate by Fabby, muru, Prvt_Yadv, Toby Speight, Mr Shunz Apr 4 at 10:40


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Fabby, muru, Prvt_Yadv, Toby Speight, Mr Shunz Apr 4 at 10:40


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 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
    Apr 3 at 23:08






  • 1





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

    – Themelis
    Apr 3 at 23:10






  • 1





    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
    Apr 4 at 4:35






  • 1





    "I have 4 files..." - No, you don't. You have 4 directories which makes all the difference here.

    – mastov
    Apr 4 at 8:30






  • 1





    @Themelis I stand corrected. They are "files", they are just not "regular files", which is important here.

    – mastov
    Apr 4 at 11:01












  • 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
    Apr 3 at 23:08






  • 1





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

    – Themelis
    Apr 3 at 23:10






  • 1





    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
    Apr 4 at 4:35






  • 1





    "I have 4 files..." - No, you don't. You have 4 directories which makes all the difference here.

    – mastov
    Apr 4 at 8:30






  • 1





    @Themelis I stand corrected. They are "files", they are just not "regular files", which is important here.

    – mastov
    Apr 4 at 11:01







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
Apr 3 at 23:08





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
Apr 3 at 23:08




1




1





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

– Themelis
Apr 3 at 23:10





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

– Themelis
Apr 3 at 23:10




1




1





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
Apr 4 at 4:35





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
Apr 4 at 4:35




1




1





"I have 4 files..." - No, you don't. You have 4 directories which makes all the difference here.

– mastov
Apr 4 at 8:30





"I have 4 files..." - No, you don't. You have 4 directories which makes all the difference here.

– mastov
Apr 4 at 8:30




1




1





@Themelis I stand corrected. They are "files", they are just not "regular files", which is important here.

– mastov
Apr 4 at 11:01





@Themelis I stand corrected. They are "files", they are just not "regular files", which is important here.

– mastov
Apr 4 at 11:01










1 Answer
1






active

oldest

votes


















7














An individual directory always shows its own size when viewed with ls - no matter the size of its contents. What you really 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




















  • 6





    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
    Apr 4 at 3:58











  • So any directory takes 4K of disk space? It feels a lot!

    – Themelis
    Apr 4 at 8:49






  • 1





    @Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

    – ivanivan
    Apr 4 at 13:35

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









7














An individual directory always shows its own size when viewed with ls - no matter the size of its contents. What you really 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




















  • 6





    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
    Apr 4 at 3:58











  • So any directory takes 4K of disk space? It feels a lot!

    – Themelis
    Apr 4 at 8:49






  • 1





    @Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

    – ivanivan
    Apr 4 at 13:35















7














An individual directory always shows its own size when viewed with ls - no matter the size of its contents. What you really 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




















  • 6





    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
    Apr 4 at 3:58











  • So any directory takes 4K of disk space? It feels a lot!

    – Themelis
    Apr 4 at 8:49






  • 1





    @Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

    – ivanivan
    Apr 4 at 13:35













7












7








7







An individual directory always shows its own size when viewed with ls - no matter the size of its contents. What you really 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 its own size when viewed with ls - no matter the size of its contents. What you really 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 Apr 4 at 9:57









Themelis

1314




1314










answered Apr 3 at 23:56









ivanivanivanivan

3,7871414




3,7871414







  • 6





    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
    Apr 4 at 3:58











  • So any directory takes 4K of disk space? It feels a lot!

    – Themelis
    Apr 4 at 8:49






  • 1





    @Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

    – ivanivan
    Apr 4 at 13:35












  • 6





    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
    Apr 4 at 3:58











  • So any directory takes 4K of disk space? It feels a lot!

    – Themelis
    Apr 4 at 8:49






  • 1





    @Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

    – ivanivan
    Apr 4 at 13:35







6




6





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
Apr 4 at 3:58





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
Apr 4 at 3:58













So any directory takes 4K of disk space? It feels a lot!

– Themelis
Apr 4 at 8:49





So any directory takes 4K of disk space? It feels a lot!

– Themelis
Apr 4 at 8:49




1




1





@Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

– ivanivan
Apr 4 at 13:35





@Themelis - or more. It is meta-data about the directory and contents, so if your directory has lots of files or subdirectories, etc it will get larger. Key is to remember the size shown for the directory is about the meta data, not the sum of the sizes of the contents of the directory.

– ivanivan
Apr 4 at 13:35



Popular posts from this blog

រឿង រ៉ូមេអូ និង ហ្ស៊ុយលីយេ សង្ខេបរឿង តួអង្គ បញ្ជីណែនាំ

QGIS export composer to PDF scale the map [closed] Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Print Composer QGIS 2.6, how to export image?QGIS 2.8.1 print composer won't export all OpenCycleMap base layer tilesSave Print/Map QGIS composer view as PNG/PDF using Python (without changing anything in visible layout)?Export QGIS Print Composer PDF with searchable text labelsQGIS Print Composer does not change from landscape to portrait orientation?How can I avoid map size and scale changes in print composer?Fuzzy PDF export in QGIS running on macSierra OSExport the legend into its 100% size using Print ComposerScale-dependent rendering in QGIS PDF output

PDF-ში გადმოწერა სანავიგაციო მენიუproject page