project: Beginning Bash

Tags bash skill/scripting

It’s important to understand a bit about the command-line if you want to be a professional coder. There are a few reasons for this:

  1. Professional coders usually use Git for version control. If you are not comfortable with the command line then there is a limit to what you can do
  2. A lot of command-line understanding is transferrable to other situations
  3. If you ever deploy your code onto the internet you’re likely to need to use bash commands to interact with the devices running your code.

Getting started

The first step is to open the command line or terminal on your device:

  • If you are running Android, then open your termux app
  • If you are running Windows, then: Open your Git shell OR using linux subsystem for windows, just open your Linux terminal
  • If you are using Mac or Linux, just open your terminal

If this is the first time you’ve ever opened such a program, DON’T PANIC! You’ll get used to this thing.

Now you’ll need to learn a few basic commands to get by:

http://korflab.ucdavis.edu/bootcamp.html

Make sure you understand everything up to step 14. NB: Completing and understanding up to step 14 is essential for the successful completion of this project.

Questions

  1. What is the purpose of the ls command?
  2. What does the command ls / output?
  3. What does the pwd command do?
  4. What command would you use to make a new directory?
  5. What command would you use to navigate into a new directory?
  6. What command would you use to navigate ‘upwards’ one level in the directory hierarchy?
  7. What command would you use to navigate upward two levels?
  8. What does the command cd home do?
  9. What is a relative path?
  10. What is an absolute path?
  11. Explain the usage of the man command?
  12. What command would you use to remove the directory git-basic-exercises? Assume that this directory is NOT empty.
  13. Explain the use of tab completion?

How to submit your work

Please follow the following instructions to submit your work:

TOPIC: How to submit your markdown files

RAW CONTENT URL