UNIX Hints & Hacks

ContentsIndex

Introduction

 

Previous ChapterNext Chapter

Sections in this Chapter:

UNIX Knowledge Needed

 

Symbols, Command Syntax, and Notations

   

Tested UNIX Flavors

 

Structure

   
Shells and Scripting Languages  

About the Author

   
Before Beginning  

Dedication

   

Hints & Hacks Topics

 

Acknowledgments

   

Examples: Commands, Functions, Routines, and Procedures

 

 

Introduction

In 1990, when the World Wide Web was nothing more than the World Wide Dirt Road without any type of graphical interface, those who knew UNIX were among the first to start posting useful computing information on the Internet. They created FAQs, bulletin boards, Usenet news postings, and Gopher sites, to name a few. The world was clumsy, but it felt like our world because we knew how to move around and control it.

Throughout the years UNIX system administrators never lost touch with always wanting to help others. We help our user community and we help each other. UNIX administrators are problem-solvers who enjoy sharing information. It isn't always about money (but money is nice). We're always willing to share our knowledge, scripts, programs, and time for free. We've been used and abused by management and the user community, so it really all comes down to love for that four-letter word, U-N-I-X. It is also one of the few operating systems that can still be obtained free of charge.

To this day, the majority of the best UNIX programs available are free, in the public domain, and written by UNIX administrators such as you and me. BSD, Linux, Sendmail, Perl, Cops, Crack, and Satan are a few of these. So many are available on the Internet that we needed to do something to bring all the information and applications together for UNIX administrators to share. This is how the UNIX Guru Universe, http://www.ugu.com, was created. It brings together everything on the Internet that UNIX system administrators need to survive at work.

The UNIX Guru Universe was created in 1993. It had all the bells and whistles a newly formed, GUI-based World Wide Web site needed to have, but it was designed to look like a reference library of information for UNIX system administrators. It was both flashy and boring. Those lucky enough to have a fast T1 connection to the Internet, to quickly download all the graphics, were put to sleep by the textbook design of the site.

However, UNIX administrators were ecstatic to finally find a site on the Internet that brought it all together for them. In its first week of existence, the site made over 10,000 good impressions and received over 900 flames (many complete with graphic profanity) bashing the design. UNIX administrators love to tell it like it is and not hold anything back. Even if they are introverts, the extrovert in them emerges when it comes to discussing UNIX. It was clear that UNIX system administrators need several things in a Web site.

System administrators want no frills. They have very little time and want to get to the point. Forget all the technical computer jargon; put it in plain simple English and tell it like it is. Most UNIX administrators work best in relaxed environments. This is why you see very few UNIX administrators in a suit but often hear music playing from their computers while they work. They also love ripping hardware apart, so why mess up a good suit? Most of them own only one or two suits (if that) anyway. Since 1993, the UNIX Guru Universe has lived by these standards, and they define what you can expect in this book.

This book is written so you all can read and understand it. Junior level administrators will feel that UNIX is easy to master and senior level administrators should see new possibilities or be reminded of old forgotten ways of accomplishing certain tasks. It will not read like a technical book. It is written as if you and I were standing next to one another and talking UNIX! The book's structure lets you find topics quick and easily. This book gets to the point without wasting time.

The book doesn't provide step-by-step administration tasks. Many excellent UNIX system administration books on the market will do this for you. What this book discusses are some of the many things you might have asked yourself, such as, "There has to be a way to...", "Which command is the best on...?", and "Why do it that way?"

You'll read about hints and hacks that show how several commands can be combined (or piped) together to perform a single function. You'll find routines made up of a series of commands that reduce a 10-line script with several I/O operations down to a single command with one I/O operation. You'll learn commands that can perform the same task and examples showing why and when you should use them. You'll also find a reason for the hint or hack and examples of real-life experiences for its use.

There are ways to enhance your ability to make your work environment more automated and efficient. Often there is even more than one way to do it. Many of the top UNIX system administration books do not discuss these topics at all. Most all the books discuss straightforward standard approaches to dealing with UNIX. This book can be considered an extension or supplement to the UNIX administration books already on the shelves. It expands and touches on topics where other books leave off.

The book doesn't introduce any new commands, but it does introduce new ways to use these UNIX commands and functions. The discussions in this book of many well-known and little-known commands provide insight into the extended ways that command combinations and routines can build a more efficient computing environment. By learning various ways to manipulate UNIX commands, you can build off these little UNIX hints and hacks to generate new techniques. These are techniques that will enable you to apply what you learn to each of the different computing environments that you might have to work in.

You might think that some of the commands or scripts presented here are not the most efficient way of performing the task, but that isn't the goal of this book. There are usually multiple solutions to any problem in UNIX. Although some hacks might not be the most efficient way to execute a command or function in your environment, they might be in another environment.

UNIX Knowledge Needed

This book is for those who already have a basic hands-on understanding of the UNIX operating system as an administrator. It is not recommended for users unless they have read an introductory UNIX book and have been using UNIX and applications for over a year. If you feel comfortable moving around in UNIX, editing files, and so on, you're set.

If you are looking forward to enhancing your UNIX system administration skills, this book touches on some more advanced commands and scripting programs. It will not teach programming or scripting, nor is it an introduction to UNIX. The hints and hacks discussed in the book will be educational not only to beginning and junior level administrators but to the most advanced senior level system administrators as well.

UNIX has so many commands available that performing a specific task can be done in a variety of ways. By reading this book (and having an understanding of UNIX), an administrator should come away with ideas for expanding the use and structure of the commands and topics discussed. The novice UNIX administrator will learn new techniques and impress others who don't have as much UNIX knowledge. The more experienced senior administrator should not be bored by the book but gain insight into existing possibilities for performing functions in their daily administration duties that they might have forgotten.

UNIX Hints & Hacks

ContentsIndex

Introduction

 

Previous ChapterNext Chapter

Sections in this Chapter:

UNIX Knowledge Needed

 

Symbols, Command Syntax, and Notations

   

Tested UNIX Flavors

 

Structure

   

Shells and Scripting Languages

 

About the Author

   

Before Beginning

 

Dedication

   

Hints & Hacks Topics

 

Acknowledgments

   

Examples: Commands, Functions, Routines, and Procedures

 

 

© Copyright Macmillan USA. All rights reserved.