Lost Files

When you delete a file using the command line utility rm, there is no way to undelete it. (If you move a file to the Trash using the GUI, you can just open the Trash icon to recover the file.) You can also delete a file unrecoverably by writing over that file with another file.

Suppose that you accidently delete a file that you want to get back. If it's a file you've just created, you are out of luck. However, you can recover some older files. In particular, it is very easy to get files from the previous day.

Every day at about 4:00 AM, the AFS file server makes a backup of all the files in each user's Linux home directory. You can find this backup in a directory named OldFiles in your home directory. It will contain the versions of the files that existed at the time the backup was made, that is, from the previous day. It does not contain any files older than that. You can't modify files in the OldFiles directory, but you can copy files from there into other locations.

(In most cases, it is possible to recover a a previous version of a file that is up to a month old, provided that the file was in your account overnight. Contact the administrator, David Eck (eck@hws.edu), for help on this. However, this is not something that will be done routinely.)

Crashed Programs

What to do when a program crashes? If a window becomes unresponsive in Linux, but the rest of the desktop is still functional, there are several ways to "kill" the one application that is frozen without restarting the computer.

Sometimes, the system will notice that a window has stoped responding to your mouse clicks and will ask you whether you want to force the program to stop.

One way is to use the program "System Tools / System Monitor," from the Start menu. The System Monitor is a nifty program that allows you to monitor various aspects of the computer, such as CPU load and network activity. The "Processes" tab in this program contains a list of processes running on the computer. If you know the name of the program that is frozen, you can locate the program in thisA; list, select it by clicking it, and then hit the "End Process" button at the bottom of the screen. If you've killed the right process, this will end the program and remove its window from the screen.

Another option is to enter the command xkill on the command line. This will allow you to kill a window just by clicking on it. That way, you don't have to know the name of the process that owns the window.

Note also that simply logging out and logging in again will terminate all the programs that you were running, even if they have crashed.

Frozen Computer

Occasionally, you might have the entire GUI freeze on a computer. In that case, you might have no option but to force the computer to restart. For the computers in the Math/CS labs, you can do that by pressing and holding the power button for about 5 seconds. The power button is on the bottom left side of the back of the display.

Finally, note that when working on the command line, if pressing return doesn't give you a prompt, you can stop the running program by typing CONTROL-C. Also, closing the command-line window will kill any programs that you started in that window.