theThe problem is the argument,
f
argument take. It takes the next value as the filename, so it must be the last of argument:
tar cvzf output.tgz folder
or:
tar -cvzf output.tgz folder
isThese are both the same and no takedon't produce an error.