7z documentation says it can't archive directories, but it can

Bug #2026217 reported by Daniel Barrett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
p7zip (Ubuntu)
New
Undecided
Unassigned

Bug Description

"man 7z" says that 7z cannot archive directories on its own. Under "Backups and limitations," it says:

On Linux/Unix, in order to backup directories you must use tar :
  - to backup a directory : tar cf - directory | 7z a -si directory.tar.7z
  - to restore your backup : 7z x -so directory.tar.7z | tar xf -

This is false. Watch 7z archive a directory:

$ ls -R mydir
mydir:
one subdir/ three two

mydir/subdir:
four

$ 7z a archive mydir
[it works]

$ 7z l archive.7z
...
   Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
2023-07-05 20:06:00 D.... 0 0 mydir
2023-07-05 20:06:04 D.... 0 0 mydir/subdir
2023-07-05 20:05:56 ....A 4 17 mydir/one
2023-07-05 20:06:04 ....A 4 mydir/subdir/four
2023-07-05 20:05:59 ....A 4 mydir/three
2023-07-05 20:05:57 ....A 4 mydir/two
------------------- ----- ------------ ------------ ------------------------
2023-07-05 20:06:04 16 17 4 files, 2 folders

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: p7zip-full 16.02+dfsg-8
ProcVersionSignature: Ubuntu 5.15.0-76.83-generic 5.15.99
Uname: Linux 5.15.0-76-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Wed Jul 5 20:03:19 2023
InstallationDate: Installed on 2020-02-29 (1222 days ago)
InstallationMedia: Kubuntu 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
SourcePackage: p7zip
UpgradeStatus: Upgraded to jammy on 2022-12-03 (214 days ago)

Revision history for this message
Daniel Barrett (dbarrett-m) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.