Tente este comando ( você pode usar 7z, 7za ou 7zr ):
7z x -oextract/ foo.7z
De acordo com a página man 7z, não deve haver espaço entre a opção '-o' e o nome do diretório:
-o{Directory}
Set Output directory
7z, 7za e 7zr:
7-Zip is a file archiver with the highest compression ratio. The pro‐
gram supports 7z (that implements LZMA compression algorithm), LZMA2,
XZ, ZIP, Zip64, CAB, RAR (if the non-free p7zip-rar package is
installed), ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem
images and DEB formats. Compression ratio in the new 7z format is
30-50% better than ratio in ZIP format.
- 7z uses plugins to handle archives.
- 7za is a stand-alone executable. 7za handles less archive formats than 7z.
- 7zr is a stand-alone executable. 7zr handles less archive formats than 7z.
7zr is a "light-version" of 7za that only handles 7z archives.