6 ms·
This is a good and safe practice. And I think most people do it this way after cleaning up the mess of a badly built tarball at least once :)
by vorakl 2y ago
This is a good and safe practice. And I think most people do it this way after cleaning up the mess of a badly built tarball at least once :)
- nox101 2y agoI'd argue this is a design bug. Extracting into the current directory should either not be possible or be the exception (tar xvfz --current-directory) and not singling out tar here, unzip, pkunzip, etc all have this issue and have all cause people data loss and worse because if this default unsafe behavior
- deleted 2y ago[deleted]
- djbusby 2y agoLots of things looks like a design bug today but were a prudent choice for the environment at the time. Like when I have an electrician at me house. Says the old way was dumb... but that was fully up to code in 1954. Time makes fools of us all.
- nox101 2y agoThat might be true but I've using arc, tar, pkzip since the 80s and even then I lost work and had to clean up on floppy disks because of this issue. I suppose the prudent thing is to list the files before decompressing
- 8n4vidtmkvmk 2y agoThe fact that any program will overwrite files by default is also terrible.
- eviks 2y agoUnless there is only one folder in the archive, and it's not overwriting anything, then it should be extracted into the current directory so you don't get nested dupes