du -s * | sort -n -r | sed 10q
Okay, but now show me the size of the file in a human readible format next to the name.
$ du -sh * | sort -rh
20M dist
6.9M pebble
1.5M internal
308K cmd
...41–50 of 215 posts
Earlier quoted context omitted.
I assume the parent comment did not make fun of nushell advertizing this, but instead about the rust community advertizing itself all the time.
To be honest, they have good reason. Being written in a strongly typed, memory-safe language is a huge advantage. Obviously it's not the primary thing to look out for, but I do prefer tools that are written in it.
Earlier quoted context omitted.
Historically we would discourage shell users from cat somefile.txt | whatever and instead tell them to use either whatever or, if the command accepts input file names as arguments then use those like whatever somefile.txt or whatever -i somefile.txt etc But perhaps in fish, “useless use of cat” is not so useless and would be recommended? (I mean aside from the fact that they seem to recommend their “open” command, an…
For some reason I never liked to do it the "right way". First of all it doesn't seem to actually matter. But most of all the cat way just aligns with my mental model more. Data flows left to right, if you catch my drift. It also makes it easier to add arguments to the end if re-running it.
> It also makes it easier to add arguments to the end if re-running it.
I'd like to point out that a redirection doesn't have to be the last thing in a command. E.g. the common 'echo >&2 "some message"' works fine.
[zsh]$ ls -l *(Lm+10om) zsh supports extended globs, this says: -l give me a long listing “*(…)” of any file Lm+10 who’s size “L” in megabytes “m” is greater than 10 “om” ordered by modification ascending
Earlier quoted context omitted.
PowerShell isn’t that verbose, compared to NuShell. The ls example would be (with standard PowerShell aliases): gci | where { $_.Length -gt (10 * 1024 * 1024) } | sort LastWriteTime -gt might seem weird, but it’s better than overloading >. (Also, I like the fact that PowerShell is built into Windows and has a large corporation behind it.)
Sorry but that looks terrible.
Shell has similar issues but I've put 20 years into it so the knowledge is there. Every time the PowerShell people describe PowerShell I think "that sounds awesome" but the ergonomics don't work for me.
[zsh]$ ls -l *(Lm+10om) zsh supports extended globs, this says: -l give me a long listing “*(…)” of any file Lm+10 who’s size “L” in megabytes “m” is greater than 10 “om” ordered by modification ascending
It’s of course possible to do with existing shells, but it’s impossible to argue that it’s a clear
Earlier quoted context omitted.
This reminds me of how Fish handles process substitution without requiring a special syntax. I love it! It may seem a bit odd or even cumbersome to experienced shell programmers, but in my experience with Fish, this kind of thing helps a lot with ease of learning.
It is much much better to have things be actual commands (which have a uniform syntax, and are `--help`able) rather than obscure sigils like $(#!@$). Fish is amazing!
This looks extremely interesting! Is anyone using it as a daily driver on Linux? How has your experience been?