Unix filesystem

↑ Up

Bash, or the born again shell, is a very popular and well-documented command line shell environment for working in the Unix filesystem, and consists of directories (like folders) and files. There are many good overviews to the shell environment I prefer: bash or the born-again shell. The internet is full of great tutorials on unix and bash commands and scripting.

Key commands to get familiar with:

  1. mkdir, rmdir
  2. ls
  3. cd, pwd
  4. cp, mv, rm
  5. echo, cat
  6. ./, ../ (not commands but names of special directories)
  7. man

A brief exercise:

  1. Print a brief greeting to the screen, traditionally “Hello, World!”
  2. Save that message to a file using redirection, > file
  3. Create a new directory named dir
  4. Move file containing your message to the new directory dir
  5. Change directories to dir
  6. Check that the file is in ./ not ../
  7. Double-check the contents of file
  8. Remove dir and file.