This unix and linux site aims to provide book reviews and free ebook on unix linux, unix commands, unix shell, unix programming, unix shell scripting, unix tutorial, suse linux, rehat linux, debian linux, slackware linux, linux server, linux commands, fedora linux, linux gui, linux networking, unix time sharing concepts, programming linux games, samba-3, motif programming, unix signal programming, and linux complete reference, etc

Linux Network Programming, Part 1 By Ivan Griffin and John Nelson

This is the first of a series of articles about how to devlop networked applications using the various interfaces available on Linux.
Like most other Unix-based operating systems, Linux supports TCP/IP as its native network transport. In this series, we will assume you are fairly familiar with C programming on Linux and with Linux topics such as signals, forking, etc.
This article is a basic introduction to using the BSD socket interface for creating networked applications. In the next article, we will deal with issues involved in creating (network) daemon processes. Future articles will cover using remote procedure calls and developing with CORBA/distributed objects.

Introduction To Unix Signals Programming

What Are Signals?
Signals, to be short, are various notifications sent to a process in order to notify it of various "important" events. By their nature, they interrupt whatever the process is doing at this minute, and force it to handle them immediately. Each signal has an integer number that represents it (1, 2 and so on), as well as a symbolic name that is usually defined in the file /usr/include/signal.h or one of the files included by it directly or indirectly (HUP, INT and so on. Use the command 'kill -l' to see a list of signals supported by your system).
Each signal may have a signal handler, which is a function that gets called when the process receives that signal. The function is called in "asynchronous mode", meaning that no where in your program you have code that calls this function directly. Instead, when the signal is sent to the process, the operating system stops the execution of the process, and "forces" it to call the signal handler function. When that signal handler function returns, the process continues execution from wherever it happened to be before the signal was received, as if this interruption never occurred......

Manipulating Files And Directories In Unix

By guy keren
The following tutorial describes various common methods for reading and writing files and directories on a Unix system. Part of the information is common C knowledge, and is repeated here for completeness. Other information is Unix-specific, although DOS programmers will find some of it similar to what they saw in various DOS compilers. If you are a proficient C programmer, and know everything about the standard I/O functions, its buffering operations, and know functions such as fseek() or fread(), you may skip the standard C library I/O functions section. If in doubt, at least skim through this section, to catch up on things you might not be familiar with, and at least look at the standard C library examples.
General Unix File System Structure
In the Unix system, all files and directories reside under a single top directory, called root directory, and denoted as "/". Even if the computer has several hard disks attached, they are all combined in a single directories tree. It is up to the system administrator to place all disks on this tree. Each disk is being connected to some directory in the file system. This connection operation is called "mount", and is usually done automatically when the system starts running.

Compiling "C" And "C++" Programs On Unix Systems - gcc/g++

by guy keren
This document tries to give the reader basic knowledge in compiling C and C++ programs on a Unix system. If you've no knowledge as to how to compile C programs under Unix (for instance, you did that until now on other operating systems), you'd better read this tutorial first, and then write a few programs before you try to get to gdb, makefiles or C libraries. If you're already familiar with that, it's recommended to learn about makefiles, and then go and learn other C programming topics and practice the usage of makefiles, before going on to read about C libraries. This last issue is only relevant to larger projects, while makefiles make sense even for a small program composed of but a few source files.
As a policy, we'll stick with the basic features of programming tools mentioned here, so that the information will apply to more than a single tool version. This way, you might find the information here useful, even if the system you're using does not have the GNU tools installed.
In this lovely tutorial, we'll deal with compilation of a C program, using the compiler directly from the command line. It might be that you'll eventually use a more sophisticated interface (an IDE - Integrated Development Environment) of some sort, but the common denominator you'll always find is the plain command line interface. Further more, even if you use an IDE, it could help you understand how things work "behind the scenes". We'll see how to compile a program, how to combine several source files into a single program, how to add debug information and how to optimize code.

Unix-the Bare Minimum

By Norman Matloff
Purpose - The information here is intended to be a review for those who have had a bit of prior exposure to Unix, and as a quick introduction to Unix for those who have never seen it before. (Some of the material may be new even to those with some prior exposure to Unix.)
Shells - A shell is a program that inputs Unix commands from the keyboard and relays them to the Unix system for execution. Shells typically include various shortcuts for users to use in stating their commands, and also a programming feature, in which users can make programs out of sets of their commands.
The first popular Unix shell was the Bourne shell, named sh. It still is in common use, though more often in a modernized version called the Bourne Again Shell, bash.

The UNIX Time-sharing System--A Retrospective

By Dennis M. Ritchie
UNIX is a general-purpose, interactive time-sharing operating system for the DEC PDP-11 and Interdata 8/32 computers. Since it became operational in 1971, it has become quite widely used. This paper discusses the strong and weak points of UNIX and some areas where we have expended no effort. The following areas are touched on:
  • The structure of files: a uniform, randomly-addressable sequence of bytes. The irrelevance of the notion of ``record.'' The efficiency of the addressing of files.
  • The structure of file system devices; directories and files.
  • I/O devices integrated into the file system.
  • The user interface: fundamentals of the shell, I/O redirection, and pipes.
  • The environment of processes: system calls, signals, and the address space.
  • Reliability: crashes, losses of files.
  • Security: protection of data from corruption and inspection; protection of the system from stoppages.
  • Use of a high-level language--the benefits and the costs.
  • What UNIX does not do: ``real-time,'' interprocess communication, asynchronous I/O.
  • Recommendations to system designers.

NOTE: * A version of this paper was presented at the Tenth Hawaii International Conference on the System Sciences, Honolulu, January, 1977.

Click to Read More

The Evolution of the Unix Time-sharing System

By Dennis M. Ritchie
This paper presents a brief history of the early development of the Unix operating system. It concentrates on the evolution of the file system, the process-control mechanism, and the idea of pipelined commands. Some attention is paid to social conditions during the development of the system.
NOTE: *This paper was first presented at the Language Design and Programming Methodology conference at Sydney, Australia, September 1979. The conference proceedings were published as Lecture Notes in Computer Science #79: Language Design and Programming Methodology, Springer-Verlag, 1980. This rendition is based on a reprinted version appearing in AT&T Bell Laboratories Technical Journal 63 No. 6 Part 2, October 1984, pp. 1577-93.

The UNIX Time-Sharing System

By D. M. Ritchie and K. Thompson
Unix is a general-purpose, multi-user, interactive operating system for the larger Digital Equipment Corporation PDP-11 and the Interdata 8/32 computers. It offers a number of features seldom found even in larger operating systems, including
  • A hierarchical file system incorporating demountable volumes,
  • Compatible file, device, and inter-process I/O,
  • The ability to initiate asynchronous processes,
  • System command language selectable on a per-user basis,
  • Over 100 subsystems including a dozen languages,
  • High degree of portability.

This paper discusses the nature and implementation of the file system and of the user command interface.

Click to Read More

The Linux Cookbook: Tips and Techniques for Everyday Use

by Michael Stutz
Because of its robust and stable nature, the Linux−based system is the choice of millions today. But what some may not know is that the free software movement, of which Linux is a part, is very much a counter−cultural phenomenon: the design by which it is produced and published is contrary to the notions of proprietary, intellectual "property" that have dominated mainstream culture so long. While some programmers turn their research into corporate−backed software that you cannot openly change, share, or examine (but only purchase and run on your system), Linux and other free software is the product of many individuals who courageously published and shared their research and work openly, for everyone to benefit from.

I wrote this book because I want everyone to know how to use this software, because I think everyone deserves the freedom that comes with it. I don't willingly use proprietary software−−not because it is always

inferior
to free software, but because its use precludes freedoms that I find I cannot exist without ... freedoms that should be everyone's right by default in a free, open society. (See Introduction.)

I know that Linux isn't difficult to use, especially when compared with other software and operating systems, but what was needed was a guide to show people how to use it to get things done: "Oh, you want to do

that? Here, type this."

That explains the premise of the book−−it's a hands−on guide to getting things done on a Linux system, designed for the everyday user who is not necessarily a computer programmer......

Click to Read More/Download

100 Linux Tips and Tricks

by Patrick Lambert

This book was written for anyone using Linux, from new users to experts who want to explore this wonderful operating system. The tips and tricks in this book were discovered by myself over years of experience using Linux, and learning about it. Some are very basic tips to make your computing life easier, others are advanced tricks that can save you days of work.
I tried to cover all distributions of Linux in this book. I personaly use Slackware and RedHat on PC systems. If you find any error in the book, feel free to contact me so a future second edition could correct them.
This book is divided into 5 chapters. Each chapter covers a specific topic:
  • Chapter 2 covers installation of Linux. These are tips and tricks useful when installing Linux itself or any new program. Some tips will cover new means of installing Linux on non-typical hardware, others will explain how to take Linux distributions from an FTP server and make your own CD-ROM with them, or where to find Linux CD-ROMs for as little as $2.
  • Chapter 3 covers hardware related matters. You will learn tips there on how to get your non-PostScript compatible printer to work, or how to get a sound card detected.
  • Chapter 4 covers software. You will find tips there about all kinds of Linux software, including where to find and how to install the Java Development Kit port, and everything about the Pine mail and news program.
  • Chapter 5 covers networking in all its forms. There you will see how to setup a PPP connection quickly, without editing all of the configuration files yourself, as well as some nice programs that were made to ease dialup procedures. You will also see tricks on how to make your local LAN network without unexpected problems.
  • Chapter 6 is the last chapter but covers an important part of Linux: development. Here you will find a lot of tips on how to write powerful scripts to make your system easier to handle, and a full overview of what to do and what you don't want to do in C to avoid problems like memory leaks, and how to allow easy scalability.

Click to Read More/Download

Popular Posts