So i was trying to compress lolok
folder using 7z
command :
7z a Documents/lolok/
But i forgot to create a name for compressed folder, which should be like this :
7z a cobas.7z Documents/lolok/
Too late, 7z is compresssing /home/my_username
instead of Documents/lolok
, it shows something like this :
Compressing Fake-Dropbox/My Stuff/MintLeaf40/cursors/00000000000000020006000e7e9ffc3f
Compressing Fake-Dropbox/My Stuff/MintLeaf40/cursors/00008160000006810000408080010102
Compressing .compiz/session/10101c66bb4692d073143743666037107700000020450001
Compressing .compiz/session/101039ec7cc6d9a45143830416643541000000020470001
Compressing .compiz/session/10104df3378a4b5f2c143415919040916300000020980001
Compressing .compiz/session/1010ad420c7b22ed95142202369753202900000020760001
Compressing .compiz/session/101104e28f9f142f95142534455518842300000021110001
Compressing .compiz/session/1012259bfe2f6664142572736424702700000020920001
Compressing .compiz/session/1012e8ceb6dad57094143839895664962200000020340001
Compressing .compiz/session/101441cf55618896c4142425317361606900000020900001
(Actually it shows many "Compressing" message, but due to security reason i didnt post them here)
I press Ctrl + C then, then i get "permission denied: error :
WARNINGS for files:
.cache/dconf/ : Permission denied
.cache/thumbnails/large/ : Permission denied
.gvfs/ : Permission denied
.config/enchant/ : Permission denied
----------------
WARNING: Cannot find 4 files
Break signaled
Is something like this can destroy my system ? Please explain why 7z compressing my home directory instead of Documents/lolok
?
7z a
expects and archive name (or a stub, without an extension) and then an optional list of files. If it doesn't get a list of files, it starts from the current working directory and just works recursively.So to answer your question, nothing deleted or damaged but it has likely made a file called
Documents/lolok/.7z
(a hidden file). Again, it won't have removed anything.The permission denied errors are because (it seems) you were running the command as a different user and those directories were protected from other people reading them, eg:
Here's a real demonstration. We'll start by creating some files and a subdirectory in a test directory.
Then we emulate your
7z
command and see what happens:No permissions errors because I own everything in there and have permission for it. And it's created a file called
.7z
in the subdirectory. Let's list its contents: