136 private links
This is not a fork. This is a repository of scripts to automatically build Microsoft's vscode repository into freely-licensed binaries with a community-driven default configuration.
This tool is a rewrite of ngxtop to make it easier to install and hopefully run faster. For those unfamiliar with the ngxtop, it is a tool that helps you parse NGINX access logs and print various statistics from them regardless of format. It is currently not as feature complete as the original version but it should have enough functionality to be usable.
Whatfiles is a Linux utility that logs what files another program reads/writes/creates/deletes on your system. It traces any new processes and threads that are created by the targeted process as well.
Rationale:
I've long been frustrated at the lack of a simple utility to see which files a process touches from main() to exit. Whether you don't trust a software vendor or are concerned about malware, it's important to be able to know what a program or installer does to your system. lsof only observes a moment in time and strace is large and somewhat complicated.
In Bash, the history command is capable of much more than what's been covered here, but this is a good start for getting used to using your history instead of just treating it as a reference. Use the history command often, and see how much you can do without having to type commands. You might surprise yourself!
I recently noticed that zsh and fish will instead show a character indicating a missing linefeed, and still start the prompt where you’d expect to find it:
vidarholen-vm2% echo -n "hello zsh"
hello zsh%
vidarholen-vm2%
If you’re disappointed that this is what there’s an entire blog post about, you probably haven’t tried to write a shell. This is one of those problems where the more you know, the harder it seems
[...] the signal name stands for "Segmentation Violation".
So it's essentially: SIG
nal SEG
mentation V
iolation.
But there's more!
Originally the signal was called SIGSEG. It was subsequently renamed SIGSEGV
in the userspace and a bit later - around 1980 - to SIGSEGV on the kernel
side.
These are great tools and essential to many system administrators' workflows. However, in recent years, the open source community has developed alternative tools that offer additional benefits. Some are just eye candy, but others greatly improve usability, making them a great choice to use on modern systems. These include the following five alternatives to the standard Linux command-line tools.
Notice the line makepdf & makedoc & openapp. Here I am are running the 3 functions in parallel. The wait command does exactly that, waiting for the previous things to finish. When everything is done, the pdf file opens. Let’s look at the timing now:
real 0m24.677s
user 0m21.669s
sys 0m1.746s
It is running ~27% faster. Only by wrapping the code in different functions.
As an extra, in bash the code is not evaluated all at once. If you edit a script while it is being executed, the script behaves differently. Wrapping it in functions solves that problem too.
vgrep is a pager for grep, git-grep, ripgrep and similar grep implementations, and allows for opening the indexed file locations in a user-specified editor such as vim or emacs. vgrep is inspired by the ancient cgvg scripts but extended to perform further operations such as listing statistics of files and directory trees or showing the context lines before and after the matches. vgrep runs on Linux, Windows and Mac OS.
Bach is a Bash testing framework, can be used to test scripts that contain dangerous commands like rm -rf /. No surprises, no pain.
Your terminal can display color, but most diff tools don't make good use of it. By highlighting changes, icdiff can show you the differences between similar files without getting in the way. This is especially helpful for identifying and understanding small changes within existing lines.
Instead of trying to be a diff replacement for all circumstances, the goal of icdiff is to be a tool you can reach for to get a better picture of what changed when it's not immediately obvious from diff.
Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation
TIL: which
in Shellscripts sollte vermieden werden. Es ist inkonsistent, unvollständig, nicht plattform-/shellübergreifend und noch nicht mal in POSIX. Stattdessen bietet sich command
an, also z.B. command -v tmux
.
https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
In the last two weeks, Peter Zaitsev published a 4-part series on measuring Linux performance on this blog.
His writings cover the 4 main areas where you can spot performance problems on any Linux machine, with practical tips on how to draw the right conclusions. Here are the individual pieces:
Measuring Linux Performance: CPU
Measuring Linux Performance: Disk
Measuring Linux Performance: Memory
Measuring Linux Performance: Network
I found these gave a good overall summary of the things to be on the look-out for whenever you’re troubleshooting slow applications or slow servers.
Ever tried comparing MySQL's my.cnf from a Debian and a Gentoo machine with diff(1) without going crazy?
diff(1) is an awesome tool, you use it (or similar implementations like git diff, svn diff etc) every day when dealing with code. But configuration files aren't code. Indentation often does not matter (yeah, there is diff -w and yeah, people use YAML for configs), order of settings does not matter and comments are just beautiful noise.
How?
cfgdiff will try to parse your configuration files, fetching all the relevant keys and values from them and then pretty-printing them in the original format. These results are then diffed and the diff is shown to you.
• With --indicator (or -q or 'set indicator') nano will show a kind
of scrollbar on the righthand side of the screen to indicate where
in the buffer the viewport is located and how much it covers.
• With <Alt+Insert> any line can be "tagged" with an anchor, and
<Alt+PageUp> and <Alt+PageDown> will jump to the nearest anchor.
When using line numbers, an anchor is shown as "+" in the margin.
• The Execute Command prompt is now directly accessible from the
main menu (with ^T, replacing the Spell Checker). The Linter,
Formatter, Spell Checker, Full Justification, Suspension, and
Cut-Till-End functions are available in this menu too.
• On terminals that support at least 256 colors, nine new color
names are available: pink, purple, mauve, lagoon, mint, lime,
peach, orange, and latte. These do not have lighter versions.
• For the color names red, green, blue, yellow, cyan, magenta,
white, and black, the prefix 'light' gives a brighter color.
Prefix 'bright' is deprecated, as it means both bold AND light.
• All color names can be preceded with "bold," and/or "italic,"
(in that order) to get a bold and/or italic typeface.
• With --bookstyle (or -O or 'set bookstyle') nano considers any
line that begins with whitespace as the start of a paragraph.
• Refreshing the screen with ^L now works in every menu.
• In the main menu, ^L also centers the line with the cursor.
• Toggling the help lines with M-X now works in all menus except
in the help viewer and the linter.
• At a filename prompt, the first <Tab> lists the possibilities,
and these are listed near the bottom instead of near the top.
• Bindable function 'curpos' has been renamed to 'location'.
• Long option --tempfile has been renamed to --saveonexit.
• Short option -S is now a synonym of --softwrap.
• The New Buffer toggle (M-F) has become non-persistent. Options
--multibuffer and 'set multibuffer' still make it default to on.
• Backup files will retain their group ownership (when possible).
• Data is synced to disk before "... lines written" is shown.
• The raw escape sequences for F13 to F16 are no longer recognized.
• Distro-specific syntaxes, and syntaxes of less common languages,
have been moved down to subdirectory syntax/extra/. The affected
distros and others may wish to move wanted syntaxes one level up.
• Syntaxes for Markdown, Haskell, and Ada were added.
Rewritten in Rust: Modern Alternatives of Command-Line Tools
https://zaiste.net/posts/shell-commands-rust/
After a prolonged period of inactivity, new devs have taken over to support
htop
. The new 3.0 release features lots of improvements (
https://github.com/htop-dev/htop/blob/master/ChangeLog ), mostly to
underlying low-level items.
eDEX-UI is an open-source cross-platform terminal emulator that presents you with a Sci-Fi inspired look along with useful some features as well.
It was originally inspired from the DEX UI project. It is also worth noting that eDEX-UI is no longer maintained but it hasn’t been completely abandoned. You can learn more about the current status of the project here.
Even though eDEX-UI is more about the looks and the futuristic theme for a terminal, it could double up as a system monitoring tool for Linux in the future if the development resumes or if someone else forks it. How? Because it shows system stats in the sidebar while you work in the terminal.