OS Lab Account: Disk Quota Issue and the “du” command

Each of your personal OS lab account (with username userXXX) comes with 50MB of disk space only. 50MB is more than enough for CS2106. However, if you (or the student from previous year) played with Linux (e.g., tried launching a media player), files might be generated on the disk and ate up your disk space.

If suddenly things start to act unexpectedly, you should check your disk usage. The command to run is “du -h ~” If you have 50MB of files, it is time to clean up some files.

To find out which directory occupies the most disk space, run “du ~ | sort -n”. This will sort your directories in increasing order of disk usage. You can then remove the culprit if the directory it is not needed by cs2106.

You should “man du” and “man sort” to find out what the options -h and -n means respectively.

Remember to save your files regularly and to disable Firefox caching.

Posted in lab

OS Lab Accounts

You will be given a personal OS Lab account to login to the Linux machines in the OS Lab this week. This account is different from SoC UNIX account that you use to log into SunFire, and is different from the common OS Lab account you use in Lab 1.

Here are the differences.

SoC UNIX account: You get this account either automatically (if you are an SoC student) or through application online. With this account, you can ssh into SunFire, a server machine running SunOS, from any other computers running any OSes, including your home computer, as long as you have an ssh client.

Common OS Lab account: The username for this account is oslab-user. You can use this account to login into any of the computers in the OS Lab running Fedora 14. This is a common account, meaning if you leave your files in your account, other users who has access to this common account can access it. From Lab 2 onwards, we will not be using common OS lab account anymore so you can forget about this.

Personal OS Lab account: This is the account we are giving out today (see the next post). With this account, you can login into any of the computers in the OS Lab running Fedora 14. If you should set a password known only to you, other users cannot login to the machines and access your files. Furthermore, you can login into any of the machines in the OS Lab, and get access to your files (we are running NFS). The Personal OS Lab account comes with a quota of 50 MB disk space.

The first thing you do after you login is to change your password using the command yppasswd.

Using Firefox would easily eat up all your disk quota (due to caching). So the second thing you should do after you login is to disable caching in Firefox. Do the following in Firefox to disable caching.

1. Type about:config in your address bar

2. Type ‘cache’ in the search bar, and look for network.http.use-cache, and double click it to set it to false.

If some files are already created by Firefox, you can issue the following command to remove the files and save some disk space.

r­m -rf ~/.mozilla

When working with your Personal OS Lab account, you should save and backup your files often. If you hit the disk quota and run out of space, you files might not be saved correctly!

Lab 1

Here is your Lab 1.

Lab 1 is ungraded and you need not submit you lab sheet. It aims to familiarize with basic UNIX commands, the C programming language (particular, pointers), and C programming tools on UNIX (compiler and debugger).