General Tutorials
All tutorials in General Tutorials
Sort By:    Name   Rating   Views  Comments    Date 
Browse Pages :    1  2  3  4  5  >  >> 

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...

Views: 101 Comments: 0

This might sound silly, but I've heard of many programmers that claim they do not need a debugger. They simply don't create bugs. Well, one thing is sure - either they've no idea what they are saying, or they just never put their code to real test. Or maybe they're indeed as gifted as they claim. Unfortunately, most of us tend to have bugs in our code. We could use printing commands to test our...

Views: 29 Comments: 0

Compiling a program made of one source file is easy. Compiling one made of few sources is slightly annoying, but may be automated via a simple shell script. Anything larger than that would start to get on your nerves. This is where makefiles are helpful.A makefile is a collection of instructions that should be used to compile your program. Once you modify some source files, and type the command...

Views: 56 Comments: 0

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...

Views: 36 Comments: 0

One of the problems with developed programs, is that they tend to grow larger and larger, bringing up overall compilation and linking time to a large figure, and polluting out makefile, and the directory where we placed the source files. The first time a program we write reaches this state, is normally when we look for a different way to manage our projects.It is this point where we start thinking...

Views: 109 Comments: 0

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...

Views: 31 Comments: 0

This document is meant to provide people who already have a knowledge of Programming in C, with the knowledge necessary to write Unix programs that use the network (actually, the Internet). It is supposed to save you all the time it took me to learn how to do this, due to lack of decent online documentation about the subject.The idea is to explain only the really necessary information for writing...

Views: 35 Comments: 0

One type of information that many programs require, is user information. This includes finding out the home directory of a given user, finding the list of groups a user belongs to, finding out who is logged on the system at a given time and so on.Most Unix systems keep this data in a set of files spread across the system. In order to allow programs to access this data in a portable manner, some...

Views: 36 Comments: 0

This tutorial is the first in a series of "would-be" tutorials about graphical programming in the X window environment. By itself, it is useless. A real X programmer usually uses a much higher level of abstraction, such as using Motif (or its free version, lesstiff), GTK, QT and similar libraries. However, we need to start somewhere. More than this, knowing how things work down below is...

Views: 54 Comments: 0

Many people claim that they know C or C++, and they even program in those languages. At the same time, when they stumble on a bug, they often don't truly understand its nature, and find it hard to fix (sometimes unable to fix it at all). Now, C and C++ coding requires a lot of usage of dynamic memory management, by allocating memory (malloc() or new), using it via pointers and references, and...

Views: 52 Comments: 0

Writing sequential programs is the what most, if not all, programmers are being initially trained to do. At a certain phase in their life they discover that there are other models for programs. One of them is using parallelism. This means that instead of having your program carried out in a sequence, one instruction at a time, it is being executed by several different entities simultaneously. This...

Views: 43 Comments: 0

This tutorial is an attempt to help you become familiar with multi-threaded programming with the POSIX threads (pthreads) library, and attempts to show how its features can be used in "real-life" programs. It explains the different tools defined by the library, shows how to use them, and then gives an example of using them to solve programming problems. There is an implicit assumption...

Views: 35 Comments: 0

One of the strong features of Unix-like operating systems, is their ability to run several processes simultaneously, and let them all share the CPU(s), memory, and other resources. Any none-trivial system developed on Unix systems will sooner or later resort to splitting its tasks into more than one process. True, many times threads will be preferred (thought these are candidates for a separate...

Views: 44 Comments: 0

Like in MS Windows, the files on a Linux system are arranged in a hierarchial directory structure. This means that the files are organized the same way as in Windows: in a tree-like pattern of directories (or folders in windowspeak), and those directories may contain files or other directories, which in turn may contain more files or directories, and so on...However, there are many directory trees...

Views: 47 Comments: 0

The LILO boot loader starts the kernel.The Linux kernel configured by lilo or rdev decompresses and must find and mount the root filesystem. If LILO or the kernel were not configured properly there can be a problem here.The kernel after loading the root filesystem, starts the "init" program which may be located in /sbin/init. Reads /etc/inittab for configuration information

Views: 42 Comments: 0
Browse Pages :    1  2  3  4  5  >  >>