| . | a single period refers to the current directory | 
| .. | a double period refers to the directory immediately above the current directory | 
| ~ | refers to your home directory. Note: this command does NOT work on Windows machines (Mac and Linux are okay) | 
| cd ./dirname | changes the current directory to the directory dirname | 
| ls -F | tells you what files and directories are in the current directory | 
| pwd | tells you what directory you are in ( pwdstands for print working directory) | 
| history | lists previous commands you have entered. history | lesslets you page through the list. | 
| mancmd | displays the manual page for a command. | 
| mkdir ./dirname | makes a new directory called dirname below the current directory. Note: Windows users will need to use \instead of/for the path separator | 
| rm ./filename | deletes a file called filenamefrom the current directory | 
| rmdir ./dirname | deletes the directory dirnamefrom the current directory. Note:dirnamemust be empty forrmdirto run. | 
| mv tmp/filename . | moves the file filenamefrom the directorytmpto the current directory. Note: (i) the originalfilenameintmpis deleted. (ii)mvcan also be used to rename files (e.g.,mv filename newname | 
| cp tmp/filename . | copies the file filenamefrom the directorytmpto the current directory. Note: (i) the original file is still there | 
| * | zero or more characters | 
| ? | exactly one character | 
| [abcde] | exactly one of the characters listed | 
| [a-e] | exactly one character in the given range | 
| [!abcde] | any character not listed | 
| [!a-e] | any character that is not in the given range | 
| {software,carpentry} | exactly one entire word from the options given | 
| > | write stdoutto a new file; overwrites any file with that name (e.g.,ls *.md > mardkownfiles.txt) | 
| >> | append stdoutto a previously existing file; if the file does not exist, it is created (e.g.,ls *.md >> markdownfiles.txt) | 
| < | assigns the information in a file to a variable, loop, etc (e.g., n < markdownfiles.md) | 
| | | Output from one command line program can be used as input to another one (e.g. ls *.md | head gives you the first 5 *.mdfiles in your directory) | 
| grep [options] day haiku.txt | finds every instance of the string dayin the file haiku.txt and pipes it to standard output | 
| -E | tells grep you will be using a regular expression. Enclose the regular expression in quotes. | 
| -i | makes matching case-insensitive | 
| -n | limits the number of lines that match to the first n matches | 
| -v | shows lines that do not match the pattern (inverts the match) | 
| -w | outputs instances where the pattern is a whole word | 
| find start [options] [commands] | look for files or directories with specified properties and take specified actions | 
| -type d | match directories | 
| -type f | match files | 
| -name 'pattern' | match things with specific names | 
| -maxdepth n | maximum search depth | 
| -mindepth n | minimum search depth | 
| -print | print matches | 
for filename in *.txt
do
    head -5 $(filename) | sort | uniq -c
done
  history | tail -20 > recent-commands.sh