Why I’ll (maybe) switch back to Linux soon

So for those who know me, they know I like Linux. Not just because it’s cool (it is) but because I find it user friendly. Yes seriously, I find Linux easier to use.
I never thought that it would be true when I first started using Linux all those years ago. I swear it was about 20 years ago (jeez I’m getting old) that I first installed Mandrake Linux because it was the first one I could get all the way through the install process.

Today I’ve been using Windows as my daily driver for almost a year due to the pandemic and work requirements which made it easier to just install Windows and install their crap software.

Here I was tootling around trying to do some work on a Sunday. I have the “Terminal” app open with Powershell and I’ve spent some time getting used to it, sometimes being suprised that a linux command is aliased (like ls = Get-ChildItem) when I went to do a simple check of the size of some files I’d downloaded. Hmm… how can I get simething like an ls -lh.

Quick test of it… no joy. Yeah – why would Windows allow us to continue the craze and use our commands.
Hmmm Get-Help Get-ChildItem

Get=-Help Get-ChildItem terminal output
Get=-Help Get-ChildItem terminal output

What is this malarky?
Nothing in there looks like a size switch or option… hmmm … DuckDuckGo what have you got?

DuckDuckGo search results
DuckDuckGo search results

There seems to be people wanting it but it requires scripting or piping to secondary commands. What! Why?
I get things like this link showing me how to add it to my profile (ok… cool but I just want it once) or this handy page that showed me how to pipe it like this:
Get-ChildItem E:\MyFolder -recurse | Select-Object Name, @{Name="MegaBytes";Expression={"{0:F2}" -f ($_.length/1MB)}}

Ahh… but the file I want is in Gig’s and others are Megabytes… no problem.. run this monstrosity!!

$folder = 'C:\Temp\folder'
$result = dir
$folder -Recurse | Measure-Object length -Sum | % {
New-Object psobject -prop @{
Name = $folder
Size = $(
switch ($_.sum) {
{$_ -gt 1tb} { '{0:N2}TB' -f ($_ / 1tb); break }
{$_ -gt 1gb} { '{0:N2}GB' -f ($_ / 1gb); break }
{$_ -gt 1mb} { '{0:N2}MB' -f ($_ / 1mb); break }
{$_ -gt 1kb} { '{0:N2}KB' -f ($_ / 1Kb); break }
default { '{0}B ' -f $_ }
}
)
}
}
$result | ft -AutoSize

Honestly…. I felt like installing Linux right then and there.
Then I remembered I have Linux installed via Windows Subsystem for Linux (WSL).
Cool – let’s fire up Kali and do this the easy way.

Kali running and performing ls
Kali running and performing ls

Well that was easy.

Permanent link to this article: https://marcus.herstik.com/2021/why-ill-maybe-switch-back-to-linux-soon/

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.