9

when I try using tar -xvj [file name] then hit enter it just hangs and does not unzip file.. I've tried zipping just a really small text file and it zipped into a .tar.bz file then when I tried to unzip it again it still hangs at the command line --- yet when I use the app archive manager it unzips the files no problem what gives?

1 Answer 1

10

You're missing a parameter (notice the f):

tar -xvjf <filename>

if -f <filename> is not specified, tar will default to expanding whatever it receives in standard input. So the "hang" you're seeing is just tar waiting for data.

If you feel inclined to play a bit, try redirecting your tar.bz2 file into tar's standard input:

tar -xvj < file.tar.bz2

this should also work, but it's more traditional to specify the file with -f.

Note that -f has to be at the very end because the filename is an argument to the -f option. If you do tar -vfjv filename it won't work, as the filename would be passed as an argument for -v, which makes no sense.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .