Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have this script that works like a charm that I use to generate a tgz from the files that have changed on a git branch from a certain treeish. I work on linux and it simply works.
Now, we are giving it a round on cygwin (git console, just in case) and we found that it doesn't include all changed files.
I checked that the list of files to tar is getting to the tar command (with a simple echo to make sure all parameters were being provided) and they are..... given that tar is running with zcvf I was able to see the list of files that it was compressing... it's some 200+ files.... no error output. I even tried without v so that I would only get error output instead of the list of files (no error outout at all). It all seems ok.... but when we check the tgz file there are only a handful (some 30 files) in the tgz instead of 200+ (as I said, on linux the package is generated correctly). Is there a reason for this?
Could be if they're not read-able, or the directories are not read-able by the user running the script.
Take out the f and z flags, put it stdout and stderr into a log. You'll see the entire tar archive instead of it going to a file archive. See if you can detect missing data at the raw level. Yeah, it'll be huge. Or at least don't compress and see if the archive file is correct.
After all, an uncompressed tar is a tape archive, which is merely an intelligently concatenated (and check-pointed) archive of your files.
Ok.... just checked a file that did make it into the tgz and another that didn't. They both had the same permissions (both plane files) and when I ran tar manually to create a tgz adding both files, there was no problem, they both showed up on the tgz. Could it be just out of sheer chance that the tgz file ends up with 2^5+1 files?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.