In this first tutorial, we will go over the basics of navigating the bash file system. These instructions will take you through several introductory exercises and provide you with easy checkpoints to make sure you are on track.
The lesson has been divided into the following topics:
- Exercise 1: Basic system and file navigation
- Exercise 2: System information and permissions
- Exercise 3: Wild cards, globbing, quoting, and escaping
- Exercise 4: Creating file content and access methods
The following commands will be covered in tutorial 1. Use this list as a ready-made reference for code descriptions
awk search input stream (default line-by-line), then filter, modify, and send to stdout
cat join files together, also used to display file contents
cd change current working directory
chmod change permissions for files or directories
chown change owner or owning group of files
cut remove line segments from file or files
find search for files by filename
grep search for a character string in a particular file, grep <'string'> <filename>
head print first lines of input (defaults to 10 lines)
hostname print system hostname
id print user and group IDs
less print file contents, has many powerful options to modify display
ls list files and directories in the current directory
mkdir create a new directory, mkdir <new directory name>
man print the manual for a given command, man <command>
mv move a file or directory, mv <file/dirname> <new location>
pwd print working directory, lists current directory
rm remove a file, rm <filename>
sed stream editor, used to automatically edit or update identified character strings
sort sort lines of input
tail print last lines of input (defaults to 10 lines)
touch update access and modification timestamp for file, create file if it doesn't exist
uniq print unique data from a selected file
vi/vim launch visual editor program
wc word count
whoami print user name
xargs use standard output of a command as the parameter for another command