How can I uncompress a *.7z file in Ubuntu and keep the directory structure?
First install the
sudo apt-get install p7zip-full
With this, Nautilus should have an option to uncompress 7-Zip Files.
I also recommend
p7zip-rar so it also includes support for RAR files.
This is assuming you want to do it via GUI with Nautilus. If not, after downloading the packages above do the following:
7z x PACKAGE.7z
that should eXtract the packages with full path.
There is also
dtrx - which is immensely useful for un-archiving anything.
it stands for "Do The Right eXtraction" - and will uncompress anything without any fuss.
sudo apt-get install dtrx dtrx archive.tar.XX
Run following command in the terminal:
sudo apt-get install p7zip-full p7zip-rar
Or search through the ubuntu software center as 7zip and unrar and install the packages.
For ubuntu 17.04, no need for the full package,
p7zip is enough:
sudo apt install p7zip
Then, uncompress using the
p7zip -d something.7z