This section contains a few words about some utilities I think all developers should know how to use.
Choosing the right editor is a matter of great importance. I find I need three different kinds of editors:
Linux comes with a great free programming editor called emacs. Emacs is very stable; its core functionality is almost entirely bug free. It is programmable, so you can get it do anything you want. It has many extensions for handling tasks such as browsing the web, handling email, debugging code, working at the shell prompt, and editing C++, Pascal, Perl and HTML.
emacs is an old editor and when it first came out it must have been one of the wonders of the programming world. However, I believe it has failed to some degree to keep up with the times. The default key binding you find in the editor is very well designed, intuitive, and powerful. However, it will not be at all familiar to most Windows programmers. I believe that the default emacs hotkeys are better than the ubiquitous CUA key bindings found in programs like Word. However, it has not really wise to fight city hall, and in the long run, it is better to stick with the default keystrokes found in most applications rather than learning a new set, even if they are better. I should add, however, that the emacs keystrokes are supported in many paces in Linux, including the command prompt. If you know these key bindings, you can fly through tasks at the bash prompt.
If you know how to program, you can use the emacs scripting language to make this editor do just about anything you want. Unfortunately, the scripting language built into emacs is Lisp -- not everyone's first choice for a programming language in this day and age.
Though emacs is not widely using in the programming community, two or three of the best programmers I've ever met use emacs. Nevertheless, I would not suggest using this editor unless you have a very strong yen to get absolutely complete control over every aspect of your editor. If you want that, then emacs gives it to you. However, this is an old tool which will seem outdated to most programmers.
emacs is a GNU tool, and it is available on Windows, Linux and various other platforms. There is a special version of emacs called xemacs, which has a graphical interface that is a bit more intuitive than regular emacs. You can find out about emacs www.gnu.org.
Another venerable editor in the land of Linux is called vi. I don't use this editor very often, and I find it even more old fashioned than emacs. To be utterly frank, it feels a bit to me like the old line editors that were on ancient main frames. It also feels a bit like a suped up edlin. For instance, to begin editing, you press the letter i, which puts you in edit more. To exit this mode, you press escape. To save your work, press :w. This stuff of stuff feels very old fashioned and a bit clunky by todays standards.
Despite these drawbacks, vi is a rock solid editor, which can handle very large documents with ease. If you know your way around it, you will discover many powerful features that can help you create documents quickly and easily.
One other great trait of vi is that it works almost perfectly over a telnet connection. When I telnet into another machine, I find I can get some fairly serious editing done in vi. As far as I can see, none of its functionality is hampered at all by the fact that a telnet environment is severaly restricted.
There is one other famous Linux editor worth mentioning. This one is called Joe, and I have to confess that I have never used it. I have read, however, that it supports the same keystrokes as found in old Borland IDEs, so if you are used to those key bindings you might find this to be a good editor. Certainly many experienced programming swear by it.
Finally, I'm going to talk about four modern editors that you can use on Linux. Unlike the editors talked about so far (except for xemacs), all these editors run in graphical mode. Two of them, called kedit and kwrite, come with the KDE desktop. kedit is equivalent to the Windows notepad. It is small and loads quickly. KWrite is a modest programmers editor which supports syntax highlighting for many common programming languages.
As you can see, there are lots of good free editors to use in Linux. Unfortunately, and this is very much to the point, none of them would be considered great modern editors by most programmers. In a fit of peak (???), I finally broke down one day and bought a copy of Visual SlickEdit for Linux. It seemed odd to go out and spend a couple hundred dollars on an editor when there are so many good ones available for free. Nevertheless, none of them, were quite perfect. emacs is a great editor, but it is old fashioned, and Lisp is just a really weird language.
The question, then is do I have buyer's remorse? Do I regret spending money to get an editor? Absolutely not! SlickEdit is very stable. It has a modern interface and a modern help system. It fully supports emacs, brief, CUA, vi, and other key bindings. It is almost completely configurable. It supports both syntax highlighting, and a very powerful form of code insight. Furthermore, it comes with a powerful modern scripting language based on the familiar C programming language.
The final editor I'm going to discuss is called StarOffice. it is a free download from the sun web site. StarOffice runs on Windows, Linux and other platforms. Like Microsoft Office, it comes with a powerful word processor, a powerful spread sheet, a powerful html editor, and a powerful database.
StarOffice 5.2 is a serious tool. It's HTML editor, for instance, is about 75 percent of the way to being as good as the superb Windows HTML editors HomeSite and FrontPage. It creates nice clean HTML, and features tools that make it easy to perform basic tasks such as inserting hyperlinks, lists, and other basic HTML tags.
The StarOffice Word processor has its own native format, but it can read Microsoft Office files. It comes with a powerful scripting language which is comparable to Word Basic. It has complete support for Styles. Unlike Word, StarOffice supports configurable key bindings.
In general, StarOffice is a powerful editor. Its not quite as good as Microsoft Office, but most users should find that it will meet their needs. My biggest complaint is simply that it never looks quite as good as MS Office. But that failing is the result of the poor font support in Linux, and is not a problem with the editor itself. If we lived in a more sensible world, a lot of companies would standardize on StarOffice, and give old Bill the go by on this one.
Grep will allow you to search for text in documents.
Example for searching through multiple directories for documents that contain the world "LongWord":
grep -r LongWord *
If you want to search for a more complex string, you can use quotes:
grep -r "link rel" *
You can also use regular expressions when searching for text.
Run ls -l
The first letter can be:
| - | ordinary |
| b | block device |
| c | character device |
| d | directory |
| p | named pipe |
| l | symbolic link |
Who gives you list of all the users currently logged in.
Finger gives you more detailed information about the people who are logged in. Type finger ccalvert.
Which tells you the path to executables.
Run which on Java. Now run whereis on java. Notice that you get more information from where is.
Run which on ls. Now run whereis on ls. Notice that this time you get more information from which.
apropos and man -k perform the same task. They look through all the man files, and check for the keywords listed in them. If the keyword you entered is found in the lists of keywords at the beginning of the man files, then information on that file will be spit out. This can help you figure out how to do something you don't know how to do.
Enter appropos difference. You will find several different ways to compare files.
Linux is not without some powerful graphics tools. Windows has more flashy options in this regard, but Linux has some surprisingly powerful tools. I'm going to talk about the ones that come with a standard install of RedHat.
There is one great graphics tool in Linux and it is called the Gimp. If you are using KDE, you might not be aware that the Gimp is installed on your system. However, if you open up a terminal window and type gimp, it should pop right up. If it doesn't, don't worry, as this is another free tool you can download from the web. Just hop over to www.gimp.org.
The interface for the Gimp takes a bit of getting used to, but once you get the hang of it, you quickly become aware that this is very powerful graphical editor with a number of great capabilities.