Tar hints for Mac OS X users: Difference between revisions

imported>Sicophrenic
imported>Paulproteus
Line 15:
* ._hello.c
 
They are a special file generated by Mac OS. Most hidden files can be seen using this command from a Terminal (the hyphen-a stands for "all"):
Because they start with dot, many tools hide them by default. You can see them by typing this in the terminal:
 
ls -a
 
(the hyphen-a stands for "all")
 
If you were creating a tarball of your own code to distribute, you should avoid distributing these extraneous files. The simplest way to create a tar file without these files is to ask tar to exclude them when creating the tar file. So if you would have run this command:
Line 25 ⟶ 23:
tar zcvf myproject-0.1.tar.gz myproject-0.1/
 
instead you need to pass a special set of environment variables to tar. So run it as follows:
instead you would run:
 
COPYFILE_DISABLE=true tar zcvf myproject-0.1.tar.gz --exclude='._*' myproject-0.1/
 
Because you pass the ''v'' flag to tar, causing it to operate in verbose mode, you can see which files will be added to the resulting tarball.
Anonymous user