american-ninja-warrior
american-ninja-warrior

Reputation: 8215

How to create an empty tgz file?

How to create an empty tgz file? I tried

tar czvf /tmp/empty.tgz --from-file /dev/null
tar: Option --from-file is not supported

Upvotes: 7

Views: 3883

Answers (1)

Petr Skocik
Petr Skocik

Reputation: 60107

The switch you're looking for is --files-from or -T:

tar czvf /tmp/empty.tgz --files-from=/dev/null

Upvotes: 9

Related Questions