[utils] Bytes cli

Hello every

I just wrote a util for my self called Bytes it’s a cli that print file size in human readable format blazingly fast
I know it’s not that big of deal to list file size kinda silly but here the cause
I’m really pissed off while using ls -lh it slow and the other alternative tools seems clunky too , I fire up my neovim clang++ lsp and some docs and made this tiny fast util

Screenshots / comparison



branding


Git repository


Bytes

2 Likes

Nice job! :smiling_face_with_sunglasses:

Honestly, not silly at all—ls -lh is slower than it should be, especially on large directories. I like the idea of having a purpose-built CLI tool that does just one thing fast and clean.

Just tested bytes—it’s snappy. Also cool that you’re using clang++ and had LSP in Neovim ready to go. Would be neat to support piped input later on. Like:

find . -type f | bytes

…but as-is, it’s solid!

Cheers for sharing!

1 Like

thanks for nice words, it will kept me motivated :smiley:
And yes I’ll do more feature updates later on.

1 Like

@Halano very nice! I will test it out. I have been using lsd for a long time as ls replacement but this is not always fast

2 Likes

I use lsd too , it’s slow that why I made bytes in first place

very nice!

thank you .

3 Likes

@Halano
Another option is using the native command: du -h, it’s output is very similar. Here an example of usage:

As you can see your software is more accurate then native command.
Great project btw, you had very great idea.

3 Likes

thanks @ricky89
but 2 MB of x11 errors is wild :smile:

You got this :+1:

Yes indeed 2MB of x11 errors are crazy :laughing:

The fact is yesterday evening I was using a software as multimedia streamer (MPV) that was adding debug logs strings about MB/s and framerate on xsession errors file content. As you can you see in this github issue:

It’s a well known software issue. Author said there’s not coding solution, the only idea is launching the software from CLI with some specific arguments, or create a desktop launcher with those parameters.

For now I just turned off xsession errors because I’m using multimedia stream quite often.

2 Likes

@Halano
Yesterday evening tested in a VM (ArcoLinux).
After sh compile, the file bytes appears but it can not start.

2 Likes

show logs , error or screenshot ?
So I can detect your problem.

Wich logs do you need? The terminal says nothing :frowning:

1 Like

So testet again with an xubuntu VM

1 Like

:rofl: that’s hilarious

move it to your path or run it directly, like that
./bytes bytes
./bytes <path-to-file>
it should print the size of it

Ok this worked. My fault… :frowning:
oh man

1 Like