User Tools

Site Tools


class_materials_cli_intro

Outline for "Introduction to the Command Line"

Commands are 1) executed 2) in a shell 3) with options

How to check options:

  • man
  • info

Filesystem Hierarchy Standard

  • hierarchy starts with /
  • any path starting with / starts from the root
  • any path starts with not / starts from the current directory

Files and Directories

  • pwd
  • cd
  • ls ( and options)
  • find

Display Text

  • echo
  • cat
  • less
  • tail -f
  • grep
  • sort
  • uniq

Shell

  • bash
  • sh, csh, cmd.exe

Shell Functions

  • variables and export
  • stdin, stdout, stderr
  • Redirection with < > |
  • shell builtins (type -f cd)
  • tab completion
  • history, !2, !!
  • key shortcuts: alt-. ctrl-r ^^ ctrl-a, ctrl-e

Advanced Topics

  • shell scripting, “shebang”
  • echo $$ (pid), $? (exit code)
  • jobs and processes
  • device files
class_materials_cli_intro.txt · Last modified: 2017/09/29 17:06 by thsadmin