36
roxas
8y

When my neighbor forgets to lock his computer, I append this to his bashrc

alias cd='cd $(ls -d */ | sort -R | head -1) && echo'

Comments
  • 0
    Can you please explain what it does to people which are not that familiar with that?
  • 8
    Yes. Cd is change directory in unix command line. You use it to navigate the file system. But here this alias makes anyone who uses the command change their location to a random directory instead.
  • 5
    Thanks for the explanation. I know basic terminal commands but I don't know things like that.
    Btw this is really sneaky 😄👍
  • 2
    @roxas jokes on you he uses ZSH :p
  • 1
    @skonteam I use zsh. And it works on it too
  • 1
    @roxas The implication was that adding this to the bashrc wouldn't have any effect if the person used zsh.
  • 1
    @boomi oh right! Ahahah
Add Comment