I have a.zip file. I want to extract it so I have directory "a" consist of its content similar when I do right click on directory a then click "extract here".

Is it possible to replicate that gui version without making directory first? I mean this two steps:

mkdir a
unzip a.zip -d a

I need single command with arguments.

1 Answer 1


You don't need to manually mkdir a; unzip will create the directory:

$ touch foo
$ zip foo.zip foo
  adding: foo (stored 0%)
$ rm foo
$ unzip foo.zip -d foo
Archive:  foo.zip
 extracting: foo/foo                 
$ tree foo
└── foo

0 directories, 1 file

You must log in to answer this question.

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