Part 6. Familiarize yourself with the command line [OPTIONAL]

39.

Note

This section is totally OPTIONAL and WILL NOT BE GRADED. It is meant to give you more practice in using the command line to navigate around and reading the content of your folder and files. It might be helpful to you in later lab.

You will be using the bash command line throughout the remaining labs, so familiarize yourself with the bash command line on your computer by reading through Section 1 (i.e. 1.1, 1.2, and 1.3) of this cheatsheet before answering the questions.

  • Change directory to your home directory from any other directory
  • List the files and directories in the current directory
  • List all files and directories including hidden files and directories with . in the filename, e.g. .bash_profile
  • List all items (excluding hidden items) in the current directory with file sizes
  • Show the manual for the ls command
  • List all items (excluding hidden items) in the current directory with file sizes sorted by their modification time
  • Change directory to the Documents subdirectory
  • Return the full path for the current directory
  • Create a new subdirectory named ee3801
  • Change directory to the parent directory from the Documents directory
  • Change directory to the ee3801 subdirectory you created earlier in one command
  • Create a file named test.txt from the command line (i.e. without using an editor)
  • Change directory back to your previous directory in one command
  • Remove the ee3801 subdirectory you created and all its contents
  • Display the entire shell config file (e.g. .bash_profile/.bashrc/.zshrc) in your home directory
  • Display the shell config file part-by-part
  • Display the first 10 lines of the shell config file
  • Display the last 10 lines of the shell config file
  • Copy the shell config file to a file named .bashrc-orig
  • Rename the .bashrc-orig file to .obashrc
  • Remove the .obashrc file
  • Display a count of only the number of lines in the shell config file
  • Look for the word conda in the shell config file
  • Show how much disk space you have available in human readable form (i.e. kilobytes, megabytes, gigabytes, etc.)
  • Show the cumulative disk usage of all the items in your ~/Documents directory in human readable form (if your Documents directory is empty, use another directory that has multiple files like ~/miniconda3)
  • Show the current date and time