1

I have this script that compress every directory into separate files:

#!/bin/bash

#compress every subfolder into separate files
find . -maxdepth 1 -type d -print0 | parallel -0 --eta 7z a -t7z -bso0 -bsp0 -m0=lzma2 -mx=9 -ms=on -mmt=on {}.7z {}

Which works as intended, but at the end, the terminal stays at:

Computers / CPU cores / Max jobs to run
1:local / 8 / 8

Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
ETA: 0s Left: 1 AVG: 0.51s  local:1/344/100%/0.5s

I have to ctrl+c to exit and recover the terminal. Is that normal or I'm doing something wrong?

kurokirasama
  • 737
  • 8
  • 31

1 Answers1

2

As commented by @MarkSetchell, the problem was that find prints the current directory too. To avoid that, I used -mindepth 1 as an aditional option for find.

kurokirasama
  • 737
  • 8
  • 31