Jump to content
  • entries
    17
  • comments
    12
  • views
    8,575

About this blog

mostly OS related stuff, with a mix of programming, scripting,shell,hardware,config related stuff

Linux , Windows (and OsX +more):

tips,tricks and general observations on any hardware,os,software and other it related stuff.

  1. Stuff (Tools, Tricks, Commands Procedures):
    • ... i wish i had come across years ago as it would have made life easier 
    • ... i think everyone knows but proves me wrong everytime
    • ... that is but shouldnt be
    • ... that seems like a nobrainer to me but isnt 
    • ... that fustrates me
  2. Systems, Procedures, Designs
    • ... that are hidden marvels and deserve more attention
    • ... that make no sense or are Idiotic
    • ... that are broken at its core in my opinion
    • ... are poorly tought out and or implemented
    • ... that are Anti Solutions and or Solutions in Name only
  3. Other Rants ,Idea's i need an Outlet for
    • ... ideas for programs
    • ... stuff that needs to be made
    • ... things that boggle my mind

...

Entries in this blog

Bash Sourcedir script :final?

more or less final version : lists faulty source files now . and doesnt count them in the final sourced file count. needs some testing now 🙂 #!/usr/bin/env bash # ############################################################################ # # PATH: /etc/profile.d AUTHOR: Hoefkens.J@gmail.com # # # FILE: bash_sourcedir.sh 0v99 - 2023.05.22 # # ############################################################################ # function

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Linux Archives for beginners/ tar basics

with the comming of new linux users , and the existance of many chatrooms and more importantly many use `tldr` wich is much faster and easier to get what you need from then using the man pages. even moreso when many distros dont even set up the defaults so the manpagers are colored and are just a big sea of white text . i see many who dont actually know how to use the tar command and stuff like: help me im doing : tar fxcz somefile.tar.bz2 and it gives an error help me im doing

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Bash history script , that collects all , and sync all with current on top:

#!/usr/bin/env bash # ############################################################################ # # PATH: /opt/local/config/rc/bash AUTHOR: Hoefkens.j@gmail.com # # FILE: 311_history.conf 2023-04-04 09:33:40 # ############################################################################ # HISTFOLDER="/var/cache/bash/history" HISTGLOBAL="${HISTFOLDER}/history.glob" HISTSESSION="${HISTFOLDER}/history.session.$$" HISTFILE="${HISTFOLDER}/history.$$" HI

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Bash Aliasses (update:changed gio trash to trash-cli)

Some of you might have notice that when you run gio trash inside a bind-mounted folder, it fails with:   theirs seems no fix for this in term s of gio trash, however , trash-cli has no problem doing this, its not as versatile as gio, (only does trashing|restoring|cleaning) but it does trashing really well,     so i changed the aliasses in my bashrc alias file to this command. Here is the updated version of the file: #!/usr/bin/env bash # ##################

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Bash Aliases

#!/usr/bin/env bash # ############################################################################ # # PATH: /opt/local/config/rc/bash AUTHOR: Hoefkens.j@gmail.com # # FILE: 511_aliases.conf # ############################################################################ # # ReSource Bash Running Config (use after config changes) alias rebash='source ~/.bash_profile' # ls & exa Shorhands alias ll='ls -bghAls' alias llr='ls -bRghAls' alias tree='exa -T' alias llt='exa -laT' alia

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Script that can source all files in a directory , with filter

#!/usr/bin/env bash # ############################################################################ # # PATH: /etc/profile.d AUTHOR: Hoefkens.J@gmail.com # # FILE: sourcedir.sh # ############################################################################ # ############################################################################ function sourcedir { local SRC local SELECTED local MATCH local I local N local W local GP local GC local GS local CONF l

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Some nice BAT (b-cat) functionallity:colorize [pattern] to STDOUT on the fly [oneliner|script]

#!/usr/bin/env sh READFROM=$1 MATCH=$2 COLOR=$[ 29 + 0$3 ] printf "\nPress \033[1;32m[ctrl]+[c]\033[0m to quit.\n\n" function help() { echo 'USE: $ bwatch [PATH] [STR] [INT]' echo 'PATH : file to watch' echo 'STR : string to watch for' echo 'INT : {0..16} Color (ANSI 29+)' echo ' : eg: 2 = RED 3 = GREEN ,... ' echo 'TIP: use in Terminal with miniview/minimap to quickly spot highlighted content;eg http://terminolo.gy' exit } [[ $1 == -h ]] && help tail -n 5 -f $READFROM | bat

Herr.Hoefkens

Herr.Hoefkens in bash tricks

first entry linux programs and tools i wish i had known about 10 years ago

Commandline: ccat : a colorized version of cat  use : $cat /etc/fstab # flags = --bg="dark" # has nice feature to output html with --html=true $sensors | ccat --bg="dark" # reading from stdin # notes : to be usefull you should put it as an alias in your ~/.bashrc (or your aliases.bashrc): alias ccat="ccat --bg='dark' -G Decimal='*green*' -G Keyword='blue' -G Punctuation='*yellow*' -G Plaintext='reset' -G String='brown' -G Type='*white*' -G Literal='fuchsia'" $mic

Herr.Hoefkens

Herr.Hoefkens in bash tricks

×