Subject: tar + switch directory: Error "Use of "-C" without parentheses is ambiguous"
From: sneal@email.com (Stephen Neal)
Date: 12/9/2007 12:10:57 PM
I want to tar (and later gzip) a directory tree with s command like:
tar czvf "/usr/local/stephen/backup.tar.gz" -C /home/logtest/public_html ./2006/ ./2007/
So before start taring I want to go to the base dir
/home/logtest/public_html
for that operation and then tar all subdirectories /2006/ and /2007/
(with relativ pathes).
However when calling this command (in a perl script) I got the following error/warning:
Warning: Use of "-C" without parentheses is ambiguous at /usr/local/stephen/bin/testscript.pl line 5.
What's wrong ?
According to the Gnu-tar help the option -C let me jump to the base directory before.
Stephen
|