tar is one of those ancient commands from the days when option syntax hadn't been standardized. Because all useful invocations of
tar require specifying an operation before providing any file name, most
tar implementations interpret their first argument as an option even if it doesn't begin with a
-. Most current implementations accept a
-; the only exception that I'm aware of is Minix.
Older versions of POSIX and Single Unix included a
tar command with no
- before the operation specifier. Single Unix v2 had both traditional archivers
tar, but very few flags could be standardized because existing implementations were too different, so the standards introduced a new command,
pax, which is the only standard archiver in since Single Unix v3. If you want standard compliance, use
pax, but beware that many Linux distributions don't include it in their base installation, and there's no
pax in Minix. If you want portability in practice, use
tar cf filename.tar.