Skip to content

Instantly share code, notes, and snippets.

@mariocesar
Last active May 6, 2019 13:16

Revisions

  1. mariocesar revised this gist May 6, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,8 @@ touch ~/.bash_profile

    ## Hide your commands from the bash history

    > sysadmin says: What was doing in the server?
    Add an space before your command, that will make ignoring capturing the line to the bash history file.

    ```shell
  2. mariocesar revised this gist May 6, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    Petty things that annoy a Sysadmin, also a How-To avoid madding yourself by remembering Petty things that will annoy you.


    ## Subtle disabling of loading a .bashrc when connecting with ssh.

    > sysadmin says: My .bashrc file is not loading!
  3. mariocesar revised this gist May 6, 2019. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@

    > sysadmin says: My .bashrc file is not loading!
    You could make a sysadmin expend hours trying to debug a .bashrc just by creating and empty
    .bash_profile in the home directory, this will override the loading of .bashrc and load the instructions
    in the .bash_profile instead.
    You could make a sysadmin expend hours trying to debug a `.bashrc` just by creating and empty
    `.bash_profile` in the home directory, this will override the loading of `.bashrc` and load the instructions
    in the `.bash_profile` instead.

    ```shell
    ssh server
  4. mariocesar revised this gist May 6, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,8 @@ You could make a sysadmin expend hours trying to debug a .bashrc just by creatin
    in the .bash_profile instead.

    ```shell
    $ ssh server
    $ touch ~/.bash_profile
    ssh server
    touch ~/.bash_profile
    ```

    ## Hide your commands from the bash history
  5. mariocesar revised this gist May 6, 2019. 1 changed file with 17 additions and 2 deletions.
    19 changes: 17 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,22 @@ You could make a sysadmin expend hours trying to debug a .bashrc just by creatin
    .bash_profile in the home directory, this will override the loading of .bashrc and load the instructions
    in the .bash_profile instead.

    ```shell
    $ ssh server
    $ touch ~/.bash_profile
    ```
    ssh server
    touch ~/.bash_profile

    ## Hide your commands from the bash history

    Add an space before your command, that will make ignoring capturing the line to the bash history file.

    ```shell
    $ echo "hello"
    $ history
    echo "hello"
    history
    $ echo "Secret"
    $ history
    echo "hello"
    history
    ```
  6. mariocesar created this gist May 6, 2019.
    12 changes: 12 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    ## Subtle disabling of loading a .bashrc when connecting with ssh.

    > sysadmin says: My .bashrc file is not loading!
    You could make a sysadmin expend hours trying to debug a .bashrc just by creating and empty
    .bash_profile in the home directory, this will override the loading of .bashrc and load the instructions
    in the .bash_profile instead.

    ```
    ssh server
    touch ~/.bash_profile
    ```