find?
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
I'm not sure how underrated it is but the exec feature in find
is so useful, there are so many bulk tasks that would just be incredibly difficult otherwise but instead are just one line
awk
..for parsing the output of other commands quickly and simply. Then that parsed output can be used to create simple log messages or be passed as args to other scripts. Powerful.
I think a lot of people don't realise that yt-dlp works for many sites, not just YouTube
I used it recently for watching a video from tiktok without having to use their god awful web UI and it was amazing
nano was and still is vital to me learning and using linux, I will not learn how to use vim so if the distro forces it to be default im not using it.
Why is editing text so convoluted for seemingly no reason.. also hate that vim must be used for certain files.
I used nano when I started but now I am using vim for one year already. I'd recommend taking a few days where you only use vim and I think you will see why people like it. With a few motions you can be much faster than you would be in Nano.
One of the big reasons I switched to nixos is that I mostly need to use the console only for updating my system by editing the configuration file using nano. I do very little besides that thankfully while the GUI side of linux gets better everyday.
vim must be used for certain files??
Cant remember exactly but it had something to do with a file relating to sudo and it only was allowed to be edited with a vim style editor.
There may be certain times where it's all that's available, I think I remember having to edit fstab in some recovery state in vi
It's for people to memorize hundreds of arcane shortcuts and shit so they can feel like a smug hacker and gloat over the rest of us using other editors and getting just as much done as they are.
Also for graybeards that haven't realized it's not 1985 anymore.
Wait until you meet an emacs user! ;p
Yeah, to this day vim still isn't intuitive for me, so I just use nano as it's either often included or simple to install on most Distros.
Unless a script is hardcoded for vim I haven't had to use it.
I abused debfoster for years... it kept my machines running very, very clean.
Idk a lot of commands but I think wget for downloading webpages and rsync for syncing devices are pretty awesome
The first time I used wget I felt so awesome. I was grabbing some extra music files I think it was for Ur-Quan Masters.
Use less
for checking contents of files. Many people use cat
all the time, but I don't like it, because if you do that often, your terminal window quickly gets flooded with stuff, and then you have to scroll up and down if you wanna see a previous output. With less
, your file opens in a different "frame", which you can close when you're done.
cat | more
Useless use of cat award!
Yes! I use less all the time, combine it with grep, etc.
Inshellisense is teaching me a lot. :) It's an autocompleter.
https://github.com/microsoft/inshellisense
Also, Atuin for history.
I like https://github.com/aristocratos/btop personally. It's way prettier than the normal top command which you use to watch processes to find the one that's hogging all of the CPU or whatever. And it's not so much that it's underrated so much as it's not very well known or distributed by default.
pipeviewer or pv
Great call! pv
is deceptively powerful. Being able to see progress and rate limit a pipe is incredibly useful.
ia
: internetarchive https://archive.org/developers/internetarchive/cli.html cli tool, i only use it for downloads, it can a bit more than the eye meets first, like accepting a wildcard to download certain files or specify other stuff. I have an incomplete script to help me with that, which I want to share in the future. The only problem is, that the internetarchive at archive.org is often very slow at downloading.
dd
is probably well known, but one of the simplest and most powerful ways to accidentally delete all data on your hard drive. dd if=/dev/random of=/dev/sda
People always sleep on script
. It's badass and let's you do goofy things like this while keeping standard terminal formatting: https://github.com/StaticRocket/dotfiles/blob/043e9a56cc9515060188ec4642e4048c0dd6c000/dot_bashrc#L79-L94
A few that I use every day:
- Fish shell
- Starship.rs
- Broot (a brilliant filesystem navigator)
- Helix editor (My favorite editor / IDE, truly the successor to vim IMO)
- Topgrade (updates everything)
Just commenting to give more love to helix. It's my favorite "small quick edits" editor.
Could you explain them in more depth? I opened them and don’t know
Helix is a terminal based text editor. It’s much like vim / neovim, but unlike those editors it’s good to go right out of the box, no configuration or plugins needed to make it work well.
Topgrade is one I haven’t used, but it looks like its intended purpose is to let you upgrade your apps with one command, even if you use multiple different package managers (I.e. if you were on Ubuntu, you could use it to upgrade your apt packages, at the same time as your snap packages, as well as flatpak, nix, and homebrew if you’ve added those.)
Fish is a replacement of bash that's a bit more user friendly (has some cool auto completion features out of the box and more sane behaviour like handling of spaces when expanding variables). I personally started to use nutshell recently but unlike fish it's very different from bash.
Starship is a "prompt" for various shells (that bit of text in terminal before you enter the command that shows current user and directory in bash). I haven't used it but AFAIK it has many features like showing current time, integration with git, etc.
I heard about helix from you and I've used it for a year and a half or so now, it's by far the best editor I've used so far and I can definitely vouch for it
Nice!
I'm a big fan of screen
because it will let me run long-running processes without having to stay connected via SSH, and will log all the output.
I do a lot of work on customers' servers and having a full record of everything that happened is incredibly valuable for CYA purposes.
Woah screen is seeing active development again? There was like a decade where it stagnated. So much so that different distros were packaging different custom feature patches (IIRC only Ubuntu had a vertical split patch by default?) Looking at it now, the new screen maintainers had to skip a version to not conflict with forks that had become popular.
When tmux stabilized I jumped ship immediately and never looked back.
There is also zellij, which can do the same but also has modern functionality specific for development workspaces!
(Although screen
or tmux
will still probably be more widely available on remote machines etc)
nohup
is similar
I've had nohup fail to keep things running after my session ended quite frequently. It's like it just goes to the next step in the process then gives up.
I'd recommend tmux
for that particular use. Screen has a lot of extras that are interesting but don't really follow the GNU mentality of "do one thing and do it well."
When tmux was first released I was already so used to screen that I never really considered switching. What would some convincing arguments be for me to make the effort to switch now?
Tmux / Screen is like the emacs/vim of the modern day Linux I think.
Screen is more than capable, but for those who have moved to Tmux, they will absolutely advocate for it.