ravi chandra
ravi chandra

Reputation: 73

why does tar -cf ${PWD}.bz2 not produce any output?

I ran the following command. tar -jcvf ${PWD}.bz2 a b c d. I expected a bz2 folder as the output. But the command did not output anything. what am i missing ?

Upvotes: 0

Views: 71

Answers (2)

Walter A
Walter A

Reputation: 20012

When you want a output file in a bz2 dir, use ${PWD}/bz2/outputfile

Upvotes: 0

NiebieskiLuk
NiebieskiLuk

Reputation: 141

your command syntax is correct, so if you have permissions for reading a,b,c,d file (or directory???) and write to ./.. directory (one level up), file should be created.

example command output (a,b,d - files, c - directory with 2 files)

a
b
c/
c/file2
c/file1
d

at the end just type:

stat ${PWD}.bz2

Regards,

Upvotes: 1

Related Questions