Bash-Oneliner: A collection of handy Bash One-Liners and terminal tricks

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Bash-Oneliner

    A collection of handy Bash One-Liners and terminal tricks for data processing and Linux system maintenance.

  • In case there is no space at all, sort will complain if the /tmp directory is on the same fs, then the only option is to search any suspect directories with du -sm $dir

    And about this one: https://github.com/onceupon/Bash-Oneliner#using-ctrl-keys

    A bit surprised that the Ctrl+b(ack one...) and Ctrl+f(orward one char) shortcuts are not included.

    As well as their Alt+b/f for a word back/forward too. Very convenient for going through a long command by getting in the beginning or the end of the line, then move words back/forth to update it.

  • shfmt

    Dockernized shfmt. This formats shell script. (by tmknom)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • sub

    a delicious way to organize programs

  • vscode-bash-debug

    Bash shell debugger extension for VSCode (based on bashdb)

  • tlog

    Terminal I/O logger

  • Enterprises that requires logging of user actions will very likely not being doing it at the shell level, either through compiled in options, or shell history.

    Instead, the Kernel has built in functionality called Auditd[0], which is capable of logging any and all executions, file or socket accesses, and much more. Along with included tooling for quickly finding and alerting on events[3].

    Further, if terminal logging or playback is really required (usually not), it's generally done through pam with tlog[1]. Red Hat 8 and above come with built-in tlog support[2].

    [0] https://access.redhat.com/documentation/en-us/red_hat_enterp...

    [1] https://github.com/Scribery/tlog/blob/main/README.md

    [2] https://access.redhat.com/documentation/en-us/red_hat_enterp...

    [3] https://wiki.archlinux.org/title/Audit_framework

  • ShellCheck

    ShellCheck, a static analysis tool for shell scripts

  • IFS='\0' doesn't do what it seems: https://github.com/koalaman/shellcheck/wiki/SC2141

    You almost always want "read -r": https://github.com/koalaman/shellcheck/wiki/SC2162

  • the-art-of-command-line

    Master the command line, in one page

  • See also "The Art of Command Line": https://github.com/jlevy/the-art-of-command-line

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts