×
all 87 comments

[–]ipsirc 29 points30 points  (4 children)

ls /bin /sbin /usr/bin /usr/sbin | sort -u

[–]BRArjun_890 35 points36 points  (3 children)

ncdu is a useful tool for checking out which files are occupying the most space

[–]daemonpenguin 17 points18 points  (1 child)

Just about anything in the moreutils package. Stuff like "sponge" is great if you do a lot of manipulation of data on the command line.

"sponge reads standard input and writes it out to the specified file. Unlike a shell redirect, sponge soaks up all its input before writing the output file. This allows constructing pipelines that read from and write to the same file."

Basically, instead of something like "sort -fu file.txt > newfile.txt && mv newfile.txt file.txt" you can do "sort -fu file.txt | sponge file.txt".

More from r/linux

  Hide

Comments, continued...

[–]smaug59 15 points16 points  (10 children)

jq

[–]kriebz 4 points5 points  (1 child)

As more and more things become "web services", this is necessary. Unfortunately my mind has decided to pronounce it "jelq"

[–]thank_burdell 4 points5 points  (0 children)

Jamiroquai.

[–]AdmiralQuokka 1 point2 points  (7 children)

I'm still sceptical about this, though I've seen it used in the wild. It's basically an embedded DSL for handling structured data in bash.

I feel like there must be a better answer to this problem. Something like nushell, if not using a proper programming language directly.

I find myself just writing a little Rust crate when I run into structured data these days.

[–]henry_tennenbaum 0 points1 point  (6 children)

I think there's value to learning it because it's the standard, but there's also jello, which uses python syntax.

[–]AdmiralQuokka 1 point2 points  (5 children)

I'm not concerned about the syntax, I don't want an embedded DSL in my Bash scripts. It doesn't matter if that DSL is inspired by JS or Python.

I'm saying that jq and jello are crutches to compensate for Bash's inability to deal with structured data. And I think the answer for that problem should be choosing a better tool than Bash for the job. Different people will have different preferences for what that "better tool" should be. Nushell, JavaScript, Python, Rust...

The point of using Bash is that it's already installed. If you need to install another tool on top of it anyway, there's no reason to stick to Bash in the first place.

[–]kriebz 0 points1 point  (4 children)

It's entirely the point to string other tools together with a shell script. If you have data in JSON, you need a json parser. Sure, depending on the situation, someone might code in awk, or tcl, or perl, or these days Python, but that doesn't mean a simpler tool integrate e.g. web services into a shell script isn't immensely useful.

[–]AdmiralQuokka 0 points1 point  (3 children)

Check out nushell. I don't think it's the hammer for every nail, but maybe it'll convince you that we don't need to write code for a DSL inside string literals of another language because there is no other way to handle structured data in a script.

[–]kriebz 0 points1 point  (2 children)

I mean... I don't use jq enough for it to even begin to be a problem. And jq is in apt and this "nushell" thing isn't, so probably not going to happen.

[–]killerqueen1010 0 points1 point  (1 child)

it's not that hard to install without apt though? There are a couple different ways, but installing through cargo was how I ended up doing it on my debian system.

[–]kriebz 0 points1 point  (0 children)

Why would I? There's like 30,000 packages in the Debian repository. I fully intend to support developers that make sure their software is packaged for Debian, and discourage the mistake of not doing so.

[–]Minecraftwt 12 points13 points  (0 children)

nnn is a nice file browser in the terminal

[–]realvolker1 8 points9 points  (0 children)

I like bat, glow, chafa, and pandoc a lot. I use these extensively in a txtpreview.zsh script I made. I also like gum and fzf, but I can't use gum in scripts because it isn't available in all my distros' repos. I use pw-record to record wav files, then I use whisper.cpp to transcribe them. I use kitty with hdrop from hyprland-contrib to have a scratchpad terminal. Atuin is amazing for shell history, even though it isn't customizable. I also like eza a lot, as well as ripgrep, and if you use grep -P a lot, rg --pcre2 is pretty much a drop-in replacement. There's this lscolors generator script called vivid that you would also like, if you don't feel like spending hours writing your own dircolors like I did.

Edit: duperemove is great for btrfs. I also like inotifywait from inotify-tools. d-feet is useful for dbus exploration (so you don't have to do as much trial and error with dbus-monitor), as well as dconf-editor for dconf.

Shilling my own dotfiles repo https://github.com/REALERvolker1/homescripts, specifically /bin, /.config/zsh, and /.config/rustcfg. I wrote a lot of scripts and programs that other people might find useful, especially when it comes to command line stuff.

[–]fuhglarix 7 points8 points  (1 child)

delta as a diff tool especially in git. It makes git diff and other operations so much easier to read and understand.

[–]unpopularredditor 0 points1 point  (0 children)

Thanks for this. Looks really good.

[–]AlexandruFredward 7 points8 points  (0 children)

micro

https://micro-editor.github.io

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities of modern terminals. As the name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use.

[–]gruedragon 10 points11 points  (10 children)

exa as a replacement for ls.

I use gdu and duf all the time.

batcat (or bat, depending on your distro) as a replacement for cat.

[–]unit_511 10 points11 points  (4 children)

exa is unmaintained, and it seems like it's getting taken out of some repos (Fedora 39 didn't have it last time I checked). I've switched to eza, and it's been working great.

[–]aperum 7 points8 points  (0 children)

There is also lsd as a ls replacement.

[–]AdmiralQuokka 0 points1 point  (1 child)

I still don't get what the advantage is other than nice colors.

[–]unit_511 0 points1 point  (0 children)

The feature I use the most is probably the git integration. It can show if files are modified, new or ignored.

[–]Ruck0 7 points8 points  (2 children)

My only gripe with bat is that it should be called bess.

[–]Redneckia[S] 0 points1 point  (1 child)

It is kinda annoying that you need to exit and then it wipes the output

[–]aperum 2 points3 points  (0 children)

That's actually a feature of the pager (less by default) which uses the terminal's altscreen capability. Use a pager that does not or simply deactivate pager usage with bat --paging=never.

[–]Redneckia[S] 2 points3 points  (1 child)

Exa is a must for me

[–]HazelCuate 2 points3 points  (0 children)

Eza

[–]OideFoide 6 points7 points  (0 children)

duf and btop as replacements for df and htop

[–]ben2talk 2 points3 points  (2 children)

with nala comes yay paru

eza is my goto lister: so abbr ls 'eza --icons --group-directories-first https://i.imgur.com/t4GO0Xk.png

zoxide for finding stuff - here 'zi video' https://i.imgur.com/GGmeioe.png

topgrade upgrades - everything... https://i.imgur.com/yCvD5iS.png

  1. Self update
  2. System update (using system tools)
  3. Other stuff (Config update, Flatpak update, Firmware, Fisher, TLDR, rustup, Code extensions, micro plugins)

wget and yt-dlp - who uses 'download managers'?

Really it's hard to separate tools I use every day from 'useFULL' because they all are...

How about variety -n variety -t variety -f for managing, deleting/moving downloaded wallpapers to favourites?

Or gimp $(variety --get) to adjust/edit (add vignette or whatever) a wallpaper before saving/moving to favourites.

mkcd lets me Create a directory AND CD into it in one move...

https://i.imgur.com/PrNbPPY.png

So now we have mkcd function mkcd(){ mkdir "$1" && cd "$1" ; } Then obviously rmdir doesn't work so I use abbreviation abbr rmdir 'rm -rvf'

For CAT: bat --paging=never --theme="Catppuccin-macchiato"

So now in Dolphin we have fun making a new file: https://i.imgur.com/BEh8plc.png

Then clean up with 'rmdir'https://i.imgur.com/wP5JOqu.png

[–]Redneckia[S] 1 point2 points  (0 children)

Good stuff

[–]ben2talk 0 points1 point  (0 children)

The most useful and under-rated wget -qO- https://raw.githubusercontent.com/puxplaying/starshell/master/starshell/starshell | bash -s

[–]seiha011 2 points3 points  (0 children)

I use mtr, "logfile navigator" lnav, network-manager mtui. if you are/like oldschool: mc ;-)

[–]GalaxyTheReal 2 points3 points  (0 children)

Network-Manager and its nmtui I dont get why some distros refuse to use IT AS Default renderer since its super easy to use, Feature rich and has many Plugins (e.g. integrated openvpn Plugin)

[–]hilltop_yodeler 2 points3 points  (0 children)

First, let me say that if you've never visited K.Mandla's blog of Linux experiences, you should. K.Mandla stopped blogging several years back unfortunately. His keen wit, along with a desire for simplicity and putting hold hardware to work in a modern world made his blog a daily must-read for me during its heyday. Here is his list of cli software along with a short-list of graphical software. Some of this software may be old, but there are a bunch of wonderful nuggets in there that are worth exploring!

Some of my favorite cli go-to's are:

ffmpeg, mplayer, rsync, mocp, nmcli, gcp, gdu, ncdu, tree, df, duf, vitetris, asciiquarium

[–]froody-towel 2 points3 points  (0 children)

thefuck is a useful and fun one.

https://github.com/nvbn/thefuck

[–]CalendarSpecific1088 3 points4 points  (3 children)

tmux for multiplexing, persistence, and joy

[–]darkxhunter0 5 points6 points  (2 children)

I've changed tmux for zellij. Feels more modern and feature complete.

[–]kriebz 1 point2 points  (1 child)

I've stuck with screen because tmux seems weird and gives me feature overload.

[–]CalendarSpecific1088 0 points1 point  (0 children)

I did too for a long time, and do what works, but there is some value if you can work past it.

[–]SweetBabyAlaska 2 points3 points  (0 children)

if you love Nala and things like that, you will love "gum" and "vhs" or any of the tools by Charm. Gum has a bunch of useful CLI stuff like a pager, a markdown renderer for the terminal, a beautiful Yes/No prompt, a terminal file picker, a fuzzy finder matcher, a style mode that can help you make colorful strings and boxes, a spinner for running processes, an interactive Csv table cli, a text input box, formatting etc.. all in a single binary.

[–]ben2talk 4 points5 points  (0 children)

Get bored with 'ping'...

Welcome Pingu https://i.imgur.com/KLhX70L.png

[–]darkxhunter0 2 points3 points  (0 children)

I really love the new generation of classic Unix tools alternatives, mostly powered by rust. Stuff like eza, fd, ripgrep, dua, delta, zellij and btop are an essential part of my daily workflow.

[–]cazzipropri 4 points5 points  (3 children)

Why do you spell useful like that?

[–][deleted] 9 points10 points  (0 children)

Just to piss you off.

[–]Redneckia[S] 1 point2 points  (1 child)

Woops thanks! Title is stuck like that, but my question still stands

[–]mister_gone 0 points1 point  (0 children)

We also would have accepted:

Woops thanks! Titlle is stuck llike that, but my question stillll stands

[–]creeper6530 1 point2 points  (1 child)

I really love Nala, it just is so more beautiful

[–]Redneckia[S] 0 points1 point  (0 children)

I love cli tools that use that style

[–]spectrumero[🍰] 1 point2 points  (0 children)

netcat, tcpdump, nmap are great for network debugging.

[–]mx2301 1 point2 points  (0 children)

lsd as replacement for ls. It also has fancy icons to better separete the contents of the directory you are.

[–]CalendarSpecific1088 1 point2 points  (0 children)

Ranger file manager. Holy cow, that was life changing. Don’t stop until you learn :flat, bulkrename, and the filter commands.

[–]CalendarSpecific1088 1 point2 points  (0 children)

sshfs is a fuse filesystem for scp and has helped me in many scenarios.

[–]artifexor 1 point2 points  (0 children)

fd, rg, ugrep, jdupes, fclones

[–]5long 1 point2 points  (1 child)

qrencode to copy a short string of text to another device. I have a script that works like: wl-paste | qrencode -o - -t ANSI256UTF8

[–]MatchingTurret 2 points3 points  (0 children)

And its complement: zbarimg

[–]FakenMC 1 point2 points  (0 children)

Here are two great ones:

  • Cointop - Console-based UI application for tracking and monitoring cryptocurrency coin stats in real-time.
  • btop - Excellent console-based system monitor (like htop on steroids).

[–]SmartWeb2711 0 points1 point  (0 children)

I am looking to Build a Custom CLI tool to collect centralized data across multiple AWS accounts in the Org. I am looking for some Developer who have prior experience to build such tools. Let me know it is a freelancing work with Pay.

Let me know if anyone of you will be interested.

[–]One_Mess_1093 0 points1 point  (1 child)

https://github.com/GianlucaP106/mynav

TUI Workspace and session manager built on tmux

[–]Redneckia[S] 0 points1 point  (0 children)

That's actually siiiick

Edit: u should call it lazymux or something

[–]alerikaisattera -2 points-1 points  (2 children)

fortune, cowsay, lolcat

[–][deleted] 3 points4 points  (1 child)

He said useful

[–]KlePu 1 point2 points  (0 children)

nyancat?

Also, lolcat can sometimes make long text more readable (though I doubt many people will read longer texts in terminal).

[–]RepresentativeAsk492 0 points1 point  (3 children)

What exactly are you looking for? There are tons of useful tools, but I need some limitation: like everyday use, programming, server stuff, etc.

[–]Redneckia[S] 0 points1 point  (2 children)

all of the above

[–]RepresentativeAsk492 5 points6 points  (0 children)

Netcat is my go to tool for network stuff. Love cli navigation with ranger.

[–]ben2talk 0 points1 point  (0 children)

Have a look at macleanhttps://gitlab.com/cscs/maclean

Lazy Arch tool - I started writing my own script, but some guru went one better... discussed in forum for a week whilst writing and tweaking.

Nice on EOs too...

Tidies up your junk, removes data for uninstalled flatpak, cleans up AUR too - all safe defaults.

If you just sit and hit enter to go through it, you'll do nowt.

[–]TenTypekMatus 0 points1 point  (1 child)

Git.

[–]henry_tennenbaum 0 points1 point  (0 children)

Never heard of it.

[–]kriebz 0 points1 point  (0 children)

I recently made good use of comm, while comparing lists of things, and I couldn't make sense of using diff for what I was doing.

[–]rufwoof 0 points1 point  (0 children)

Native xterm. With the -ti vt340 switch that has .sixel images supported. Convert a .png or whatever to a .sixel image using a online image converter, and you can cat some.sixel within xterm to see the image displayed. For the framebuffer, yaft supports sixel images, a simple compile and yaft /bin/sh ... and then cat some.sixel ... and again the image is seen.

[–]Lurksome-Lurker 0 points1 point  (0 children)

dtrx It intelligently tries to determine and extract an archived file.

[–]Reasonably-Maybe 0 points1 point  (0 children)

btop

[–]bogdan5844 0 points1 point  (0 children)

ncspot. Got so used to it that it's almost impossible for me to go back to the regular desktop Spotify client.

[–]CalendarSpecific1088 0 points1 point  (0 children)

mpv for media

[–]CalendarSpecific1088 0 points1 point  (0 children)

fdupe for finding duplicate files

[–]CalendarSpecific1088 0 points1 point  (0 children)

dcfldd for disk cloning with accurate progress status

[–]Competitive_Ad_6239 0 points1 point  (0 children)

csvkit Various tools for manipulation of csv files.

Fdupes, easy tool to remove duplicates from anywhere/everywhere.