how do I use tar -C on Snow Leopard when creating an archive ?

Posted by ssc on Super User See other posts from Super User or by ssc
Published on 2010-06-06T06:59:25Z Indexed on 2010/06/06 7:02 UTC
Read the original article Hit count: 297

Filed under:
|
|

The man page states

-C directory
      In c and r mode, this changes the directory before adding the following files.

However, tar does not change to the directory I specify, but instead reports

tar: <folder name>: Cannot stat: No such file or directory

for every folder in the directory I run the tar command in.

Do I really have to do something like

cd <folder> && tar ... && cd -

or is there a way to get this work ?

© Super User or respective owner

Related posts about osx

Related posts about mac