I started practicing archiving stuff using the CLI (because that happens a lot faster in the terminal than it does in the GUI) and so far I managed to do it but only for a single file or folder:
However, my several attempts to archive several folders (containing many subfolders and many files and subfiles) failed miserably, so apparently I'm doing something wrong. For instance, there's this directory called "Scania Streamline v1.0.9" which contains this:
So, what I wanna do is add to an archive all folders, subfolders and the files in there but everytime I get an error. This directory tree is a mod for Euro Truck Simulator 2 and the only way for the mod to work is to add to an archive these 4 folders (def, material, sound, unit) with everything that's inside them.
These are my attempts so far. And yes, I know I can do it using the 7-zip GUI for Windows through Wine but I don't want to. I wanna do it in the terminal.
Code:
7z a mozilla-archive.7z ~/.mozilla -m9=lzma2
However, my several attempts to archive several folders (containing many subfolders and many files and subfiles) failed miserably, so apparently I'm doing something wrong. For instance, there's this directory called "Scania Streamline v1.0.9" which contains this:
Code:
.
├── def
│ ├── country
│ │ ├── austria
│ │ ├── belgium
│ │ ├── czech
│ │ ├── denmark
│ │ ├── estonia
│ │ ├── finland
│ │ ├── france
│ │ ├── germany
│ │ ├── hungary
│ │ ├── italy
│ │ ├── latvia
│ │ ├── lithuania
│ │ ├── luxembourg
│ │ ├── netherlands
│ │ ├── norway
│ │ ├── poland
│ │ ├── russia
│ │ ├── slovakia
│ │ ├── sweden
│ │ ├── switzerland
│ │ └── uk
│ └── vehicle
│ ├── ai
│ └── truck
│ └── scania.streamline
│ ├── accessory
│ │ ├── beacon
│ │ ├── b_grill
│ │ ├── codrv_plate
│ │ ├── doorhndl
│ │ ├── doorstep
│ │ ├── drv_plate
│ │ ├── exhaust_l
│ │ ├── exhaust_r
│ │ ├── f_grill
│ │ ├── f_intake_cab
│ │ ├── f_mirror
│ │ ├── mirror
│ │ ├── r_bumper
│ │ ├── r_grill
│ │ ├── r_mudflap
│ │ ├── set_dashbrd
│ │ ├── set_glass
│ │ ├── sideskirt
│ │ ├── s_mirror
│ │ ├── steering_w
│ │ ├── sunshld
│ │ ├── toyhang
│ │ └── toystand
│ ├── cabin
│ ├── chassis
│ ├── engine
│ ├── head_light
│ ├── interior
│ ├── paint_job
│ ├── sound
│ └── transmission
├── material
│ └── custom
├── sound
│ └── ui
└── unit
└── hookup
So, what I wanna do is add to an archive all folders, subfolders and the files in there but everytime I get an error. This directory tree is a mod for Euro Truck Simulator 2 and the only way for the mod to work is to add to an archive these 4 folders (def, material, sound, unit) with everything that's inside them.
These are my attempts so far. And yes, I know I can do it using the 7-zip GUI for Windows through Wine but I don't want to. I wanna do it in the terminal.
Code:
[rado@anarchy]: /media/1000GB/АРХИВ/ИГРИ/TRUCK GAMES/ETS 2/temp-1/Scania Streamline v1.0.9>$ 7z a scania.zip def/ material/ sound/ unit/ -copy
Command Line Error:
Unknown switch:
-copy
[rado@anarchy]: /media/1000GB/АРХИВ/ИГРИ/TRUCK GAMES/ETS 2/temp-1/Scania Streamline v1.0.9>$ 7z a scania.zip def/ material/ sound/ unit/ -m0
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=bg_BG.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz (306C3),ASM,AES-NI)
Scanning the drive:
65 folders, 473 files, 1186160 bytes (1159 KiB)
Creating archive: scania.zip
Items to compress: 538
System ERROR:
E_INVALIDARG
[rado@anarchy]: /media/1000GB/АРХИВ/ИГРИ/TRUCK GAMES/ETS 2/temp-1/Scania Streamline v1.0.9>$ 7z a scania.zip */ -m0
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=bg_BG.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz (306C3),ASM,AES-NI)
Scanning the drive:
65 folders, 473 files, 1186160 bytes (1159 KiB)
Creating archive: scania.zip
Items to compress: 538
System ERROR:
E_INVALIDARG