I am currently looking for a way to easily store and run commands, usually syncing files between two deeply nested directories whenever I want.

So far I found these projects:

Other solutions:

  • Bash history using ^+r
  • Bash aliases
  • Bash functions

What do you guys use?

  • SymbolicLink@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I wouldn’t install a program for this. You will end up relying on it when there are already some built in tools that can accomplish these things.

    1. Bash scripts placed in ~/bin or ~/.local/bin
    • Can have simple or complex scripts setup to do whatever you want
    • Easily called from terminal or automated through cron or systemd
    1. Environment variables set in -/.bashrc
    • Great for storing common paths, strings, etc.
    • Can be easily incorporated into bash scripts
    1. Aliases set in ~/.bashrc
    • Ideal (IMO) for common commands with preferred options
    • for example you could setup your most used rsync command to an alias: alias rsync-cust=“rsync -avuP”