5 ms·
The last point is the point really. The entire objectivity of it is ruined by weird edge cases and knowledge. The car only goes straight if both rear windows a
by setquk 8y ago
The last point is the point really.
The entire objectivity of it is ruined by weird edge cases and knowledge. The car only goes straight if both rear windows are open. You have to say "beetlejuice" three times before putting it in reverse etc etc.
- AnIdiotOnTheNet 8y agoYou sure you aren't describing an average UNIX command?
- setquk 8y agoNo because you don't have to google for an hour to find the "don't punch me in the dick" flag.
- AnIdiotOnTheNet 8y agoInstead you just have to google how to use `tar` properly. Again. You can tab complete powershell cmdlet switches. And MSDN has extensive and good documentation. Here's the page for Invoke-WebRequest. Notice the very first switch listed. Further note that Microsoft realized they screwed this up and deprecated the switch in PS 6.0 since it is now the default. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-6 https://docs.microsoft.com/en-us/powershell/module/microsoft...
- setquk 8y agoNo googling because it hasn't changed in the last 20 years. How do you unzip a 20 gig file in powershell? 1. You can use the windows shell via complicated series of calls. This runs like ass as the windows built in decompression is terrible. Also it only works properly if there's a desktop session running so over WinRM it does with a COM error. 2. Find out which version of powershell you have, hope it's 5.0 or later or install the right WMF version and then run expand-archive. And it still runs like ass. But oh no we can't because now we have to push WMF 5.0 to 150 servers which is going to take DAYS with SCCM. Some kit is on Windows 2012, some on 2012 R2 and some on 2016 because it's so damn hard migrating stuff as it has to be done by hand so you have a mix of stuff leading to a nightmare from hell. 3. Import System.IO.Compression and call .Net to do it then wrap it in a cmdlet called Expand-Archive, then wonder why it breaks when someone pushes out WMF 5.0+ 4. Push 7za.exe out with ansible and run that. This is the problem. No good outcome for really simple tasks. Friction for all of them. Edit: I'm being 100% honest here and say I hate it with such a passion because I've lived in the same building as it for several years, not because I'm not aware of how it works.
- AnIdiotOnTheNet 8y ago> Import System.IO.Compression and call .Net to do it. ...and? Why is that a problem? It is an advantage that PowerShell can call on the CLR directly (including its C FFI).
- setquk 8y agoBecause half the time it slings Exception calling "ExtractToDirectory" with "2" argument(s): "End of Central Directory record could not be found." 7zip works fine! (copied straight from my MASSIVE OneNote book of weird powershell and .Net errors and workarounds). Also they just deprecated OneNote desktop other than the turdy UWP app. Another thing to be angry about.
- AnIdiotOnTheNet 8y agoBut you're completely willing to forgive UNIX's toolset's problems because you're used to them after working with them for decades. I get it, but that does not make them better.
- setquk 8y agoWorking properly == better in my mind. Consistency, trust over everything.
- AnIdiotOnTheNet 8y ago"properly" in this context meaning "the way I am used to, warts and all", right? Because otherwise I can't see why you'd be so upset about Invoke-WebRequest doing exactly what it was designed and documented to do. Consistency? In UNIX tools? No. What you have is familiarity. Don't get me wrong, there's a lot to be said for working with tools you're familiar with, but again that doesn't mean they are actually objectively better tools.
- setquk 8y ago
- throwawaywhynot 8y agoforget about it *nix has won. No matter hiw bad some of it's design might have been. The was some nix fanatics act makes me worry about open source in general
- umanwizard 8y agoThe only two tar commands most people will ever need: Equivalent of "zip": `tar cjf OutputFile.tar.bz2 InputFileOne InputFileTwo InputFileThree` Equivalent of "unzip": `tar xf InputFile.whatever.extension` (This works whether `InputFile.whatever.extension` is bzipped, gzipped, or not compressed at all)
- yjftsjthsd-h 8y agoI would strongly suggest that you use the `a` flag rather than `j`, to automatically select file type.
- barbecue_sauce 8y ago```tar --help | grep <thing I am trying to do>```
- p2t2p 8y agoWhat can be simpler than tar? ‘tar eXtractZipFileVerbose $file’, done!