TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Share your best command

    General Discussion
    2
    3
    313
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MikeM
      Mike
      last edited by

      I have a Mac and have already created several commands. I love TriggerCMD but I am running out of ideas what else I can do with it.
      Wouldn't it be great if you share your best ideas and commands in this thread?
      Excited to see what your best commands are.
      Cheers...

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @Mike
        last edited by Russ

        @Mike, I came up with a good one for a mac. I should have thought of this sooner. I think it's useful.

        People sometimes lose all of their commands because their hard drive died or something. This way you can restore them to a new computer (or hard drive).

        Backup your TRIGGERcmd commands to iCloud Drive

        Put this text in a script called bkuptcmd.sh in your home directory (or wherever you want):

        CMP_ID=$(cat ~/.TRIGGERcmdData/computerid.cfg)
        BKUP_PATH="$HOME/Library/Mobile Documents/com~apple~CloudDocs/tcmdBackups/$CMP_ID"
        echo $BKUP_PATH
        mkdir -p "$BKUP_PATH"
        cp ~/.TRIGGERcmdData/commands.json "$BKUP_PATH"
        

        Make it executable with a command like this:

        chmod +x bkuptcmd.sh
        

        Create a TRIGGERcmd command and set the command field to this:

        ~/bkuptcmd.sh
        

        Run your command remotely.

        Witness your commands.json file in iCloud Drive:

        Screen Shot 2021-09-24 at 8.53.59 PM.png

        The folder name is your computer's TRIGGERcmd computer id. You can match that to your computer record by clicking the View Triggers button for the computer. The computer id will be in the URL.

        6de595a8-058a-4f52-8099-e7c3de10fe16-image.png

        Russell VanderMey

        MikeM 1 Reply Last reply Reply Quote 1
        • MikeM
          Mike @Russ
          last edited by

          @Russ This is amazing and so useful. I will be getting the new Mac in a couple of weeks and I was wondering already how I get my commands backed up! Perfect timing.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post