On 17/10/13 04:20 PM, Charles Swiger wrote: > Hi-- > > > On Oct 17, 2013, at 2:10 AM, devkumar....@bt.com 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