[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] add --ignore-missing to ignore missing input files
From: |
Nathan Stratton Treadway |
Subject: |
Re: [Bug-tar] add --ignore-missing to ignore missing input files |
Date: |
Tue, 1 May 2012 16:51:55 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Thu, Apr 26, 2012 at 01:37:26 -0400, Nathan Stratton Treadway wrote:
> $ touch file1.test; (sleep 1; rm file1.test)& tar cf t1.tar *.test; echo
> "Exit: $?"
> [1] 2074
> tar: file1.test: Cannot stat: No such file or directory
> tar: Exiting with failure status due to previous errors
> [1]+ Done ( sleep 1; rm file1.test )
> Exit: 2
> $ tar tf t1.tar
> big.test
> file2.test
(In case it's not already clear, the above behavior is in contrast to
the situation where a file gets deleted after being found in a
subdirectory as tar is recursively processing a directory tree -- in that
case we get the "File removed before we read it" message that's
currently found in file_removed_diag().
For example:
$ mkdir testdir
$ cp -p big.test testdir/big1.test
$ cp -p big.test testdir/big2.test
$ cp -p big.test testdir/big3.test
$ ls -U testdir/
big1.test big2.test big3.test
[Since tar processes the files within a subdirectory in unsorted
directory-entry order, to be sure that the deleted files catches tar
mid-run, I just make all three files big, and then delete the one
listed in the middle of the "ls -U" output.]
$ (sleep 1; rm testdir/big2.test)& tar cvf t5.tar testdir ; echo "Exit: $?"
[1] 6423
testdir/
testdir/big1.test
tar: testdir/big2.test: File removed before we read it
testdir/big3.test
tar: testdir: file changed as we read it
[1]+ Done ( sleep 1; rm testdir/big2.test )
Exit: 1
In this situation, --ignored-failed-read had no effect on the run:
$ cp -p big.test testdir/big2.test
$ ls -U testdir/
big1.test big2.test big3.test
$ (sleep 1; rm testdir/big2.test)& tar cvf t6.tar testdir --ignore-failed-read
; echo "Exit: $?"
[1] 6465
testdir/
testdir/big1.test
tar: testdir/big2.test: File removed before we read it
testdir/big3.test
tar: testdir: file changed as we read it
[1]+ Done ( sleep 1; rm testdir/big2.test )
Exit: 1
)
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - address@hidden - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Bug-tar] add --ignore-missing to ignore missing input files,
Nathan Stratton Treadway <=