Computer Science 010

Lecture Notes 12

Customizing the Unix Environment,

Common Unix Programs,

and A Little About C++

Customizing Unix

.profile

.bashrc

Common Unix Programs

Let's look at some of these common Unix programs:

What is C++?

It's how you increment the value of C in C, of course.

We do not have enough time to cover C++ in any depth, but here are a few highlights of how it's different than C. C++ adds object-orientation to C but does so in a very different way than Java does. Many of the differences stem from the fact that C++ is backwards compatible with C. This means that you can take a C program and run it through a C++ compiler. It will compile and execute the same way. You cannot run a C program through a Java compiler, even though much of the syntax is similar.

This means that C++ suffers from all the drawbacks of C, although it adds tools which allow you to avoid some of the pitfalls if you use them properly. C++ does not check array lengths. It is still very easy to misuse pointers, causing your program to crash. You need to do your own memory deallocation.

C++ does add the following features to C:

Bonus Topics

Stupid Unix Tricks: Search for "Stupid Unix Tricks" in your favorite search engine and follow the links. Many of them are pretty old as indicated by their poking fun at the Reagan administration, but some are pretty good. Some no longer work since newer shell and Unix utility versions give better error messages than they used to (yes, Unix used to be even MORE cryptic!). But you get the idea.

Anyone want to talk about... Unix System Administration?