If you're using Linux, you're rarely working on just one machine. To log in on another machine, use ssh, like this
ssh yourid@physics.ubc.ca
So now you have a terminal window on the remote machine. You can only run command-line stuff, right? Wrong! Try typing gedit or kedit or netscape. (I'm assuming one of these is actually available on the remote machine.) You might notice that this blocks your terminal window until you close the program again. We'll find a solution to that a little later.
You also need to know how to move files around between computers. That's where scp comes in. It's just like cp, but not limited to the local machine.
scp somefile yourid@physics.ubc.ca:somedirectory
Like cp, scp understands the -r flag, for recursive copy, which is really useful for copying whole directories.
scp -r somedir nodwell@physics.ubc.ca:.
(What's that dot at the end? It's shorthand for "the current directory", which by default will be your home directory on the remote machine.)
The fastest way to find files is with the locate command. locate is uses a database which is updated every night. This makes it very fast, but it will not find files which have been created the same day. The easiest way to use locate is just to specify a fragment of the file name, for example:
locate foo
For trimming down the results of your search, grep is invaluable. For example, to find all files which contain both report and eric in the complete file name (including path) we can use:
locate report | grep eric
If you know anything about "regular expressions", then you can do a more specific search. A good intro (in fact probably as much information as you'll ever need) to regular expressions can be found at A Tao of Regular Expressions.
If you want to specify more than the file name, for example the date modified or the file size, then the find command is the one to use. find actually searches the disk, so it can be a little bit slower. Here is an example of searching for files which are located in the directory /home/eric/misc and all subdirectories, which start with report, which have been modified in the last 2 days, and which are at least 10kb in size:
find /home/eric/misc -name 'report*' -mtime -2 -size +10k
If you want to find files by their contents, this can be done by combining a number of Linux tools together. (Combining several simple tools to do one complicated job is the Unix approach, and it is very powerful once learned.) We will use find to construct a list of files, and grep to look for lines containing a certain word. We will combine them with a pipe (|) and the command xargs which takes the output from one command and uses it as an argument for calling a second command. This sounds complicated, but the example is not too bad:
find -type f | xargs grep -i report
Here we are looking for files in the current directory (and subdirectories) which contain the word "report". The -type f flag ensures that we only get a list of regular files (and not directories and links for example) to pass to grep. The -i flag means ignore case, so we are looking for "Report" as well as "report". If you might have filenames with spaces or other special characters, this won't work quite as expected. In this case we must use:
find -type f -print0 | xargs -0 grep -i report
There is a really good tutorial on finding files in the info pages. If you are using the Konqueror web browser or the Galeon web browser, you can read it by entering info:/find in the address bar. Otherwise type info find on the command line.
For a single file, you get the best compression usually with bzip2:
bzip2 -zv filein > fileout.bz2
This file can be recovered with
bzip2 -xv filout.bz2 > filein
For multiple files, put them together in a directory and use tar
tar -cvjf file.tar.bz2 directory
To extract again use
tar -xvjf file.tar.bz2
Although bzip2 gives the best compression, gzip is faster, so you may prefer it. With gzip compression, the above two commands become
tar -cvzf file.tar.gz directory
tar -xvzf file.tar.gz
The most common compression format on Windows systems is pkzip: the corresponding commands available on linux are zip and unzip.
You can always use the command unp to uncompress a file in any compression format. (Well I've never found anything it couldn't uncompress.)
If you want to use a graphical tool to compress and decompress files, there is ark or file-roller.
Emacs is a powerful editor. It runs either a text console or graphically, as an X program. (To force it to start in the text console mode, use emacs -nw.) For programming, or HTML, or LaTeX, or other similar structured text files, it is very useful.
A good tutorial for Emacs is here.
A quick reference card for emacs can be found here. Note that the "Meta" key, which is indicated by "M-" on the reference card, is the "Alt" on PC keyboards.