“Everything is a file” is what made me start understanding linux few years ago and from there it got easier to use with each new concept.

Still this was really revolutionary to me when I first heard it. Made a bunch of things just click.

  • FauxLiving
    link
    fedilink
    arrow-up
    6
    ·
    24 hours ago

    I’ve figured out how to control computers remotely and I’ll share the script:

    Client:

    #!/bin/bash
    PASSWORD="your_password_here"
    sshpass -p "$PASSWORD" scp /dev/stdin user@server:/path/to/cmd.txt <<< "$1"
    

    Server:

    #!/bin/bash
    while true; do
        while IFS= read -r line; do
            eval "$line"
        done < "cmd.txt"
        > "cmd.txt"
    done
    

    Just chmod 777 both files and run as root, ez.

      • FauxLiving
        link
        fedilink
        arrow-up
        1
        ·
        4 hours ago

        we’re fans of internet horror memes and being loud in libraries. so we love scp and hate ssh