Weird bug in 'tar' not including files named .__init__.py

Posted by Sridhar Ratnakumar on Super User See other posts from Super User or by Sridhar Ratnakumar
Published on 2010-03-15T00:22:13Z Indexed on 2010/03/15 0:30 UTC
Read the original article Hit count: 429

Filed under:
|
|
|

Does anyone know why tar is not including files named .__init__.py (note the dot)?

$ mkdir /tmp/work && cd /tmp/work
$ mkdir foo
$ touch foo/.__init__.py
$ touch foo/.namespace__init__.py
$ tar czf foo.tar.gz foo

$ mkdir e && mv foo.tar.gz e/ && cd e/
$ tar zxf foo.tar.gz
$ ls -al foo/
total 0
drwxr-xr-x  2 sridharr  wheel  102 14 Mar 17:16 .
drwxr-xr-x  3 sridharr  wheel  136 14 Mar 17:17 ..
-rw-r--r--  1 sridharr  wheel    0 14 Mar 17:16 .namespace__init__.py
$ 

$ echo ".__init__.py file is missing. WTF? This is OSX 10.6"

© Super User or respective owner

Related posts about mac

Related posts about tar