All of my course files (labs and projects) for CSC 225 (Introduction to Computer Organization) taken through Cal Poly, with Professor John Planck.
Note: To connect to the Cal Poly servers, you must be connected to the Cal Poly network (either on campus or via the Cal Poly VPN). Available Cal Poly Unix Machines:
Once ssh is installed on your machine, you can connect to the Cal Poly servers and interface with the machines via the commands line. To connect to the server, use the following command:
ssh username@machinename
exit # to exit the server
Once a sftp client is installed on your machine, you can connect to the Cal Poly servers and move files from your machine to the Cal Poly servers and vice versa via the command line. To connect to the server, use the following command:
sftp username@machinename
quit # to exit the server
Available commands:
put -flags file1 file2 (optional) # copy a file from the local machine to the remote machine
get -flags file1 file2 (optional) # copy a file from the remote machine to the local machine
ls # get a directory listing on the remote machine
cd # change your current working directory on the remote machine
lls # get a directory listing on the local machine
lcd # change your current working directory on the local machine
Flags available for put
and get
:
-r # recursive
-a # archive
-v # verbose
-p # preserve
Once gcc is installed on your machine, you can compile and run C programs via the command line. To compile a C program, use the following command:
gcc -ansi -Wall -pedantic -Werror -o programname programname.c
./programname # to run the program
or
gcc -ansi -Wall -pedantic -Werror programname.c
./a.out # to run the program
The -ansi
flag specifies that the compiler should implement the ANSI C standard, -Wall
enables all compiler warnings, -pedantic
tells the compiler to be adhere strictly to the ANSI C standard, and -Werror
tells the compiler to treat all warnings as errors.