7 comments

  • Eddy Hernandez, over 4 years ago

    Hoping this is helpful to anyone who has tried using the command line and felt lost or someone looking to brush up on the basics.

    3 points
    • Lucian MarinLucian Marin, over 4 years ago

      There’s no word in the article about bash (the piece of software that powers Terminal app) and all its available commands.

      1 point
      • Eddy Hernandez, over 4 years ago

        Yep. I had a section about shells, the default (bash), and was going to suggest switching to zsh. It was all kind of too much for an introductory post but definitely something I plan to add. But it maybe wise to just add a link to all the available commands in case someone is interested in learning more. Thanks for the feedback!

        1 point
  • Jodi WarrenJodi Warren, over 4 years ago

    I think it's also worth knowing some of the basic grammar of the command line too.

    . means The Current Directory. Thus you can open . to open the current directory in Finder, subl . to open the current directory in Sublime Text, and so on.

    .. means The Parent Directory. So you can cd .. to move from /directory/subdirectory/subsubdirectory to /directory/subdirectory/

    ~ means your User Directory. For me, typing cd ~ takes me to /Users/jodi. This is handy because there are lots of useful files and directories in here.

    You should also be able to Tab-complete directory and file names as you're typing them. So when I'm in my home directory, I can type cd S and hit TAB. It will autocomplete to cd Sites/. I'm sure you can imagine how handy this is for long filenames.

    If you find yourself doing a lot of command-line work, look into Prezto - it's a more advanced but lighter version of the popular oh-my-zsh package.

    I also make a lot of use of z. It helps you very quickly navigate to often-visited directories.

    1 point
    • Eddy Hernandez, over 4 years ago

      Great tips! I'll try to add some of these to the post.

      1 point
    • Laurens SpangenbergLaurens Spangenberg, over 4 years ago (edited over 4 years ago )

      Don't forget that if a single tab doesn't show anything, because there are multiple files starting with those characters, press tab twice to see all files/folders that start with those characters. Then, type in the remaining characters until you're able to tab-autocomplete it.

      EDIT: To echo what another commenter on your site said, you should warn how deadly cp, rm, and mv can be.

      1 point
  • Alex ChanAlex Chan, over 4 years ago

    If you want to go deeper:

    1 point