7zip is unreliable for certain tasks

I have had too many "Is not an archive." with 7z.

I am looking for an alternative to this.

7z a -p -mhe=on test.7z *.mp3

Not sure what you mean by an alternative. This command should put all your .mp3 files into an archive.

You could also just open the folder with caja, select all the mp3 files, right click and select add to archive or compress or whatever option is showing up for you and you can chose the compression format. Although, since mp3s are already compressed, you will not get a lot of compression.

1 Like

When I try to add a password or the other choices, there is no response.

Caja is pretty nifty and has features that Thunar does not have.

Change the extension to zip or 7z instead of .tar.gz and the password option will show up.

Otherwise you can try this if the 7z is not working.

zip -e my_archive.zip file1.txt file2.jpg folder1/
1 Like

Just a warning for others. I believe 7z still has problems. It will compress but not extract on Ubuntu Mate 24.04 LTS. I am still using Peazip. You can find and install the newer package manually that works yourself. I do think Andy said he went back to 22.04 so he would be okay.

2 Likes

It works as long as you don't try to encrypt.
The problem is not in 7z but in engrampa.

It all works perfectly from the commandline as far as I tested it.

3 Likes

YesI should have mentioned Engrampa. I still use it for everything but extracting 7z which I installed Peazip for that. I tried gnome file roller which didn't work well, and Xfce’s Xarchiver which was okay but if I made a change in the file I had to compress the new file and delete the old one. Peazip updates the file for you like Engrampa did when it worked. I never checked the version but Engrampa kept working on my Sparky semi rolling Mate desktop installations.

2 Likes

ONLY tar and gzip for me !!!

I only deal with other formats (i.e. 7z, et. al.) because the creators of those files were not, in my opinion, "sufficiently enlightened" to stick with what are deemed "rock-solid" tools, even if they may not offer the "maximum compression".

Also, I usually only use tar by itself.

I reserve gzip for compressing in order to fit the size limit for sending by email.

:slight_smile:

1 Like

@tkn , @jymm , has the issue with Engrampa's handling of 7z-formatted files been reported to the developpers for corrective action?

1 Like

If it does not encrypt, it is of very limited use to me.

I am wondering if I can "double encrypt" files so it encrypts it and does
not show file names.

Yes, 7z can do that.

Yes, half a year ago:
https://bugs.launchpad.net/ubuntu-mate/+bug/2102116

It may be a great help if all of you clicked the "me too" button on that bug.

1 Like

For those who are looking for the "Me Too" button, I circled it in the below image:

2 Likes

Could you give some details please?

Search Assist

The -mhe switch in 7-Zip enables header encryption, which hides the file list in the archive until the correct password is provided. This adds an extra layer of security to your compressed files

7z a -p[password] -mhe=on [destination_file].7z [file_to_encrypt]

The man file in Ubuntu is horribly incomplete.
Use this one: https://linux.die.net/man/1/7z

1 Like

I used that format.

It seemed to occur more frequently with large archives.

I used that with a 1.7 Gb file.

This is what I have "under the hood."

andy@7:~$ inxi -Fz
System:
Kernel: 5.15.0-153-generic x86_64 bits: 64 Desktop: MATE 1.26.0
Distro: Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Machine:
Type: Desktop System: Gigabyte product: N/A v: N/A
serial:
Mobo: Gigabyte model: F2A68HM-H v: x.x serial:
UEFI: American Megatrends v: FB date: 04/22/2015
CPU:
Info: quad core model: AMD A8-7600 Radeon R7 10 Compute Cores 4C+6G
bits: 64 type: MT MCP cache: L2: 4 MiB
Speed (MHz): avg: 1604 min/max: 1400/3100 cores: 1: 1397 2: 1396 3: 1774
4: 1852
Graphics:
Device-1: AMD Kaveri [Radeon R7 Graphics] driver: radeon v: kernel
Device-2: Microsoft LifeCam HD-5000 type: USB
driver: snd-usb-audio,uvcvideo
Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: ati,radeon
unloaded: fbdev,modesetting,vesa gpu: radeon resolution: 1360x768~60Hz
OpenGL: renderer: KAVERI ( LLVM 15.0.7 DRM 2.50 5.15.0-153-generic)
v: 4.5 Mesa 23.2.1-1ubuntu3.1~22.04.3
Audio:
Device-1: AMD Kaveri HDMI/DP Audio driver: snd_hda_intel
Device-2: AMD FCH Azalia driver: snd_hda_intel
Device-3: Microsoft LifeCam HD-5000 type: USB
driver: snd-usb-audio,uvcvideo
Sound Server-1: ALSA v: k5.15.0-153-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
IF: enp1s0 state: up speed: 1000 Mbps duplex: full mac:
Drives:
Local Storage: total: 2.11 TiB used: 43.23 GiB (2.0%)
ID-1: /dev/sda vendor: Western Digital model: WD2003FYPS-27Y2B0
size: 1.82 TiB
ID-2: /dev/sdb vendor: Maxtor model: STM3320620AS size: 298.09 GiB
Partition:
ID-1: / size: 1.79 TiB used: 38.05 GiB (2.1%) fs: ext4 dev: /dev/sda3
ID-2: /boot/efi size: 512 MiB used: 6.1 MiB (1.2%) fs: vfat
dev: /dev/sda2
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 3 MiB (0.1%) file: /swapfile
Sensors:
System Temperatures: cpu: 5.2 C mobo: N/A gpu: radeon temp: 6.0 C
Fan Speeds (RPM): N/A
Info:
Processes: 280 Uptime: 4h 45m Memory: 6.71 GiB used: 3 GiB (44.7%)
Shell: Bash inxi: 3.3.13

Thanks for sharing :slight_smile:

You are most welcome tkn.

I use 7z because of password protect and hide the file list not necessarily for compression. I save a list of websites are use on a USB drive compressed with 7z so if I forget a password I can extract the list and access the site. I only use one password for that which I never use for anything else. No one in my life could hack that. I find Linux encryption more tedious and beyond my skill set.

Oh, The topic of forgetting.

As an aid for my memory, I use the following:

  1. Write it down on my calendar
  2. Make a reminder on my phone
  3. Tape an appt. reminder card on my calendar