0

I'm trying to achieve this but using 7z from linux command line:

zip -r target.zip source_folder -x *.git* -x *node_modules/\*

I tried with this but I get the following error:

$ 7z a mtss.7z mtss-ws -xr0!*.git -xr0!node_modules
bash: !node_modules: event not found

Any ideas? I though it was going to be easy...

opensas
  • 325

1 Answers1

1

! is a special character to bash, it is used to refer to previous commands (see this question on ServerFault).

Try:

set +H

to disable this functionality and then your command:

7z a mtss.7z mtss-ws -xr0!*.git -xr0!node_modules

and then:

set -H

to restore bash settings.