Lab Guideline
Bash:
Bash is a free software Unix shell written for the GNU Project. Switch to Bash if you want to use backspace key at terminal.
Pico:
Pico (Pine composer) is a text editor for Unix and Unix-based computer systems. In our course, Pico is the main text edit we will use for C programming. You can type ‘pico’ to run the edit.
Useful commands:
ls: Lists the contents of a directory. You can add options like -l to show more information about the files.
cd: Changes the directory. And you can type ‘cd ..’ to go back one directory.
pwd: Print the working directory (the current directory you are in).
mkdir: Makes directories.
rmdir: Deletes a directory. It can not be used to remove the directory which contains files.
cp: Copies files from one location to another.
mv: Renames a file or moves it from one directory to another directory. rm: Deletes a file without confirmation (by default). chmod: Changes the permission of a file. grep: Finds text within a file. cat/more/less: cat: Allows you to look, modify or combine a file. more: Allows information to be displayed one page at a time. less: Opposite of the more command. Can use up/down arrow and search function in less command. wc: Short for word count, wc displays a count of lines, words, and characters in a file.
Pipe and redirect: >: redirect the standard output. (e.g.: ls -l > output.txt) >>: redirect the standard output and append. (e.g.: ls -l >> output.txt) |: pipe. Take the output of the first command and treat it as the input for the second one. (e.g.: ls -l | wc )