Bash Day 1

  1. Instructor / helpers / course introduction.
  2. All attendees in this session should already have their assigned usernames, but you also need the password.
  3. Let’s try to log in to the training cluster.
  4. Review the program for today.

By the end of the day you should be comfortable with:

  • creating and deleting files and directories, copying and moving them
  • writing text into a file and printing its contents to the terminal
  • working with tar archives
  • copying files to/from a remote server
  • redirecting output to a file
  • using Unix wildcards (* character)
  • using pipes to construct longer commands
  • working with Unix loops

Some of the hands-on exercises we will do in the afternoon Zoom session:

  • Many exercises on navigating the filesystem.
  • Combine ls and head into a one-line command to show three largest files (by the number of bytes) in a given directory.
  • Write a one-line command to show the name of the longest (by the number of lines) *.pdb file in the current directory.
  • Working with environment variables.
  • Write a loop to rename all *.txt files in a given directory to *.bak files.
  • Write a loop to replace spaces to underscores in all file names in the current directory.