LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 12-05-2013, 10:24 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
tar (cygwin) - not inclusing all files


Hi!

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?

tar is version 1.22 on cygwin.
 
Old 12-06-2013, 06:42 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Are some of the files symbolic links? Try the -h flag for tar which will follow symbolic links.
 
Old 12-06-2013, 07:12 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Actually, no. They are all real files.

---------- Post added 12-06-13 at 10:13 AM ----------

Could it be a problem with the permissions? I'll take a close look at that to see what comes out.
 
Old 12-06-2013, 07:28 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 12-06-2013, 07:42 AM   #5
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
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?
 
  


Reply

Tags
bash, cygwin, git, git concole, tar



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why joining parted *.tar is missing files, when *.tar itelf have them? UltraMC Linux - Newbie 1 06-27-2012 01:53 PM
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
More tar issues - listing files in a single tar from a multivolume borks Thymox Linux - Software 4 09-23-2009 07:48 PM
cygwin randomly creates bad .tar.bz2 file helpmhost Linux - General 0 04-18-2007 11:37 AM
ADVX (Apache2) inclusing extramodules gjmwalsh Mandriva 0 10-11-2003 05:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration