At the end of every term, the UBC CS helpdesk will purge the undergrad Oracle accounts. If you want to keep your project running, you will need to keep your files and host them on another service after that point.
Linux is an operating system that many servers, including the undergraduate machines on which most of you will do your project, run. Note that Linux is an offshot of an older OS called Unix, and sometimes you'll see it referred to as Unix; these instructions should apply regardless of whether you're using Unix or Linux. On Linux, most commands are typed rather than being run through an interface that you click on. These commands are run from an application called a command line interface.
Here is a common list of commands that you may find to be helpful:
The following table summarizes some especially useful commands for managing files:
| Command | Function |
| man | To get help on other commands. |
| man -k | To get help on commands matching a keyword. |
| ls | To list the contents of the current directory. |
| ls -F | To list the contents of the current directory in terms of files, directories and executable programs. |
| ls -a | To list the contents of the current directory, including hidden files. |
| ls -l | To list the contents of the current directory in details. |
| pwd | To list the pathname of the current directory. |
| cd | To navigate to another directory. |
| mkdir | To make a directory. |
| rmdir | To remove an empty directory. |
| cp | To copy files. |
| mv | To move(rename) files. |
| rm | To remove files. |
| rm -i | To remove files with confirmation. |
| rm -r | To remove a directory. The contents of the directory is also removed. |
| rm -f | To remove files, overidding any confirmation. |
You may also find this list of Linux commands or the local software guide to be helpful.
To get Linux-like commands on your PC, run "terminal" from the start menu. You can also Download Xmanager (or any other terminal emulator). Note: to follow this link you'll have to follow the instructions to log on. Use the above directions to access the "Xshell" program, which came with the above software. Please make sure that you are accessing the instructions for undergrads, or you will be directed to access the wrong computer.
Note: this is definitely not needed for this class, but you may find it to be fun and/or helpful!
Mac has a built in program called Terminal that you can use. It can be found in the Applications → Utilities.
Most of you are developing your project on your own computers (locally) and then running them on the server. Some of you are making webpages using PHP. Some of you are making other applications. These instructions should work regardless of what kind of project you are making.
The first thing to figure out is where does your IDE store the files that you are editing? For most of you, this will probably be on your local machine. I cannot tell you which directory. If you are not sure, you can try using the "ls -l" command in the helpful Linux instructions above to see when the file has changed. If you are creating a webpage, you can also try clicking on it to see if when you load it into your web browser you have the change that you are making.
If your IDE is storing your files on the machine that you are trying to access that isn't changing, you need to figure out where the directory is. Probably the Linux commands above will be enough.
If your IDE is storing your files on your local machine and what you are trying to access that is not changing is on the server, then you need to move the files to the server. Note that if you are following the instructions that we gave you for JavaScript, as it says on that page, the localhost that you are connecting to IS ON THE SERVER. So you will need to move the files over.
I note that one possibility is that you can do a git pull on the server in order to move the files over from your repository. This is honestly the best long term strategy. However, I'm not sure of exactly what the details are to get this set up properly. If someone wants to tell me how to do this, I will happily update the FAQ with other instructions. Assuming that you cannot get this to work, do as instructed below.
To log onto the undergrad CS server, open your command line interface and type in the following:ssh (CWL ID)@remote.students.cs.ubc.ca (e.g., ssh r2d2@remote.students.cs.ubc.ca). When prompted for a password, type in your CWL password. Note that when you type in your password, it may look like nothing is being typed in- this is just a security measure so that people don't know how long your password.
scp stands for secure copy and is a command that we use when we want to transfer files from our computer to a server (or vice versa). In order to transfer a file, we need to know a few pieces of information first:
cd Desktopscp index.html r2d2@remote.students.cs.ubc.ca:/home/w/r2d2/public_htmlIf you are running Windows, you may also want to try Xftp software which is free for members of the computer science department.
To check your website, open an Internet Browser (e.g., Chrome, Firefox, etc). In the address bar, type in the following: http://www.students.cs.ubc.ca/~(CWL ID)/(fileName).html. Make sure you replace the parentheses with your own information. For example, if I had the CWL ID username r2d2 and the file I transferred over to the server was called index.html, I would type in the following URL: http://www.students.cs.ubc.ca/~r2d2/index.html
If you are having trouble publishing your pages, check the following: