[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] The empty tar file
From: |
Connor Behan |
Subject: |
Re: [Bug-tar] The empty tar file |
Date: |
Thu, 17 Oct 2013 18:06:34 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130806 Thunderbird/17.0.8 |
On 17/10/13 04:20 PM, Charles Swiger wrote:
> Hi--
>
>
> On Oct 17, 2013, at 2:10 AM, address@hidden wrote:
>> Hi GNU Team,
> Well, this is a mailing list for GNU tar, but there are a number of non-GNU
> folks lurking around here. :-)
>
>> This is regarding the creation of tar archive from files dropped to unix
>> through a windows filer.
>>
>> Files like ‘call for complaint.txt’ are being considered as three different
>> arguments for the tar command.
> Yes, that's standard Unix shell behavior.
> Use backslashes or quotes to surround filenames containing spaces:
>
> tar cf nofile.tar call\ for\ complaint.txt [ ...or... ]
> tar cf nofile.tar 'call for complaint.txt'
>
>> <image002.jpg>
>>
>> The archive Nofile.tar.Z is being created with 164 bytes although it doesnot
>> contain any files.
>>
>> Is there any way to stop the tar command from generating the .tar archive if
>> the files don’t exist?
> No; it's not considered an error to create a tar file which archived zero
> files.
>
GNU tar refuses to make an archive for "no files". Some might argue that
it should also refuse to make an archive for "non-existent files". I
wrote a patch for this, the last time it came up and so far no one has
commented on it:
http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00038.html
signature.asc
Description: OpenPGP digital signature