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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.