I want to exclude two files from a tar file.. But it doesn't seem to workcd /var/www/public/api_testtar -zcvf api_v2.x.tar.gz api --exclude ./api/distributor_test.php --exclude ./api/library/Distributor_API.php
exclude files in tar.gz
linux;debian;tar;gzip
try (in one line, I fold for readability)tar -zcvf api_v2.x.tar.gz    --exclude api/distributor_test.php    --exclude api/library/Distributor_API.php apiargument (e.g. api) should be put lastyou may use --exclude distributor_test.php (if you only have one file named distributor_test.php )