• 0 Posts
  • 3 Comments
Joined 2 years ago
cake
Cake day: October 23rd, 2023

help-circle


  • Here are some of the ones I use most frequently that are somewhat unique:

    # Grep Bash files
    function rgb() { rg "$1" ~/.bash_aliases ; }
    function rgj() { journalctl -b0 --grep="$1" --no-pager; }
    function rgj4() { journalctl --since "4 hours ago" --grep="$1" --no-pager; }
    function rgj1d() { journalctl --since "1 day ago" --grep="$1" --no-pager; }
    function rgrc() { rg "$1" ~/.bashrc ; }
    function rgt() { rg "$1" ~/.taskrc ; }
    function rp() { rg "$1" ~/.bash_profile ; }
    
    # Sharing aliases across devices
    alias dba='diff -s ~/.bash_aliases  ~/Sync/.bash_aliases.bak|cat' # Diff between loaded vs saved
    alias ba2s='cp ~/.bash_aliases ~/Sync/.bash_aliases.bak'  # Replace saved w/ loaded
    alias s2ba='cp ~/Sync/.bash_aliases.bak ~/.bash_aliases' # Replace loaded w/ saved
    # I have the same for bashrc and taskrc and bash_profile as well for the most part altho they are used more sparingly