3 ms·
var input = document.querySelector('#leInput'), commands = { '.tar': 'tar xfv', '.zip': 'unzip', '.tar.bz2': 'tar jxvf', '.tar.gz':
by scintill76 11y ago
var input = document.querySelector('#leInput'),
commands = {
'.tar': 'tar xfv',
'.zip': 'unzip',
'.tar.bz2': 'tar jxvf',
'.tar.gz': 'tar xfvz',
'.tar.bz': 'tar xjf',
};
I don't think the difference between .bz2 and .bz makes any sense. Am I wrong, or is it just that bz2 extracts verbosely and bz doesn't? I'd guess these flags were copied from some random sources without the author realizing they are nearly equivalent.
I know difficulty with tar is a meme[1], but once you get over that "j" means bz2, why is it hard to remember V for Verbose, Z for gZip, X for eXtract, F for File (which you'll almost always be passing)? I ask this both rhetorically because it shouldn't be hard, but also because I am sometimes oddly hesitant when forming tar commands. But not enough to reach for a web page.
[1] https://xkcd.com/1168/ https://xkcd.com/1168/
- mahouse 11y agoIt's not hard at all. I personally memorised "zxvf", and change z accordingly, or remove v if it's a shitload of files and it floods my terminal.