How to Create PDF Files in Java

 Create a small Java program that shows the ability of some iText library. You will of learn how to create a document, add a pdf writer (listener), Some add content to the created document, and last, but not least, close the document. You will learn how to create documents, add the writer pdf (listener), add some content to the document created, and last but not least, close the document.
This is just a quick intro to the creation of PDF files with Java, if you're serious about automatic PDF creation using Java, then read Bruno Lowagie's tutorial (link at the end). These are just quick intro to the creation of a PDF file with Java, if you are serious about automatic PDF creation using Java, then read the tutorial Bruno Lowagie's (link at end).
Difficulty: Difficulty:
Challenging Quite Challenging moderately
Instructions Instructions
Things you'll need: the things you need:
• Java Runtime Environment Java Runtime Environment
• Eclipse Eclipse
• library iText iText library 1. Make sure you have Java Runtime Environment, Eclipse and iText installed. Make sure you have Java Runtime Environment, Eclipse and iText installed.

2. In Eclipse create a new project, and name it what ever you like at Might That particular moment. In Eclipse create a new project, and name it what ever you might like at the time. Then right click on the project name> Properties> Java Build Path> Add External Jars> Find your iText-2.1.5.jar> Open Press> Press Ok. Then right click on the name of the project> Properties> Java Build Path> Add External jars> Find your 2.1.5.jar iText-> Click open> Press Ok.

3. Create a document object: Create a document object:
Document document = new Document (); Document document = new Document ();

4. Create a writer That listens to the document and directs a PDF stream to a file: Create a writer who listens and directs the flow of documents into PDF files:
FileOutputStream FOS = new FileOutputStream ("c: / / ElloUniverse.pdf");
FileOutputStream FOS = new FileOutputStream ("c: / / ElloUniverse.pdf");
PdfWriter.getInstance (document, FOS); PdfWriter.getInstance (documents, FOS);
5. Open the pdf document using this java code: Open the pdf document using java code: document.open (); document.open ();
6. Add Some text (ie two paragraphs) to your PDF document: Add some text (ie, two paragraphs) into your PDF document: document.add (new Paragraph ("ello !!!")); document.add Universe (new Paragraph (" Ello Universe !!!")); Color = new CMYKColor CMYKColor (0, 1, (float) 0.2, (float) 0667); CMYKColor new CMYKColor color = (0, 1, (float) 0.2, (float) 0.667);
String text = "kievan wrote more: different color and font type."; String text = "Kiev wrote more: different colors and type fonts.";
Fonts o = FontFactory.getFont (FontFactory.TIMES_BOLD, 14, Font.BOLD, color); Fonts o = FontFactory.getFont (FontFactory.TIMES_BOLD, 14, Font.BOLD, color);
Paragraph p = new Paragraph (text, o); Paragraph p = new Paragraph (text, o); document.add (p); document.add (p);
7. Close the PDF document: Close the PDF document: document.close (); document.close ();
8. / / This is the complete / / This is the complete / / Java source code That / / Java source code
/ / Generates a PDF document. / / Generate PDF document. / / ElloUniverse.java / / / / ElloUniverse.java / / /////////////////////// /////////////////////// import java.io.FileOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.IOException; import com.lowagie.text.pdf.CMYKColor; com.lowagie.text.pdf.CMYKColor imports;
import com.lowagie.text.pdf.PdfWriter; com.lowagie.text.pdf.PdfWriter imports; com.lowagie.text import .*; import com.lowagie.text .*; public class public class ElloUniverse ElloUniverse
{{ public static void main (String [] args) public static void main (String [] args)
{{ System.out.println ("ello Universe !!!"); System.out.println (" Ello Universe !!!"); / / Create a document object / / Create the document object
Document document = new Document (); Document document = new Document (); try try {{ / / Create a writer That listens to the document / / Create a writer who listens to the document / / And directs a PDF-stream to a file / / and directs a PDF-stream to a file FileOutputStream FOS = new FileOutputStream ("c: \ \ ElloUniverse.pdf"); FileOutputStream FOS = new FileOutputStream ("c: \ \ ElloUniverse.pdf"); PdfWriter.getInstance (document, FOS); PdfWriter.getInstance (documents, FOS); / / Open the document / / Open the document document.open (); document.open (); / / Add a couple of paragraphs to the document / / Add a few paragraphs to the document document.add (new Paragraph ("ello !!!")); document.add Universe (new Paragraph (" Ello Universe !!!")); Color = new CMYKColor CMYKColor (0, 1, (float) 0.2, (float) 0667); CMYKColor new CMYKColor color = (0, 1, (float) 0.2, (float) 0.667);
String text = "kievan wrote more: different color and font type."; String text = "Kiev wrote more: different colors and type fonts.";
Fonts o = FontFactory.getFont (FontFactory.TIMES_BOLD, 14, Font.BOLD, color); Fonts o = FontFactory.getFont (FontFactory.TIMES_BOLD, 14, Font.BOLD, color); Paragraph p = new Paragraph (text, o); Paragraph p = new Paragraph (text, o);
document.add (p); document.add (p); }} catch (DocumentException de) catch (DocumentException de) {{ System.err.println (de.getMessage ()); System.err.println (de.getMessage ());
}} catch (IOException IOE) catch (IOException IOE)
{{ System.err.println (ioe.getMessage ()); System.err.println (ioe.getMessage ()); }} / / Close the document / / Close the document document.close (); document.close (); }} }}

source : http://www.ehow.com

How to Create a Tutorial PDF

Save the document as a PDF is an easy way to share with others without worrying about file compatibility or unauthorized changes made to the document. Although the format was created by Adobe, you are not required to purchase Their software to view and create PDFs. Although the format created by Adobe, you are not required to buy their software to view and create PDF files. You can use one of the many free programs available to create a PDF That Is compatible with any PDF viewer. You can use one free program available for creating PDF files compatible with PDF viewer.
Difficulty: Difficulty: Easy Quite Easy moderately
Instructions Instructions
1. Download and install a PDF printer driver (see Resources). Download and install a PDF printer driver (see Resources). Many companies make this software available for free. Many companies that make the software available for free.

2. Open the document That Would you like to convert to PDF. Open the document you want to convert to PDF. You can convert any type of document That cans be printed, Including images, websites, text documents and spreadsheets. You can change all kinds of documents that can be printed, including pictures, websites, text documents and spreadsheets.

3. Click "File" and select "Print." Click "File" and select "Print."

4. Select the name of your PDF software from the drop-down menu labeled "Printer Name." Select the name of your PDF software from the drop-down menu labeled "Printer Name."

5. Click "OK." Click "OK." Depending on the software you are using, you May be asked to select the PDF quality. Depending on the software you use, you may be prompted to select quality PDF. Name your PDF and select the directory WHERE You Want it to be saved. Name your PDF and select the directory where you want to be saved. Press "Enter" to create the PDF file. Press "Enter" to create PDF files. 

source : http://www.ehow.com

Dual-Booting Windows and Ubuntu

A user may have problems dual-booting Ubuntu and Windows. In general, a Windows OS installed first Should Be, Because its bootloader is very particular. In general, the Windows OS must be installed first, because of its very special bootloader. A default Windows installation usually occupies the entire hard drive, so the main Windows partition needs to be shrunk, creating free space for the Ubuntu partitions. A default installation of Windows typically occupies the entire hard drive, so the main Windows partition needs to shrink, creating space for the Ubuntu partition. (You Should clean up unnecessary files and defragment the drive before resizing.) See changing the Windows partition size. (You have to clean up unnecessary files and defragment the drive before changing the size.) Add to resize the Windows partition.

After shrinking a Windows partition, Should you reboot into Windows once prior to installing Ubuntu or Further manipulating the partitions. After shrinking the Windows partition, you have to reboot once to Windows before installing Ubuntu or more manipulate partitions. This allows the Windows system to automatically Rescan the newly-resized partition (using chkdsk in XP or other utilities in more recent versions of Windows) and write changes to its own bootup files. This allows Windows systems to automatically search for new re-size partitions (using chkdsk in XP or other utilities in the newer versions of Windows) and write changes to the file itself bootup. (If you forget to do this, you later have to repair May the Windows partition bootup files manually using the Windows Recovery Console.) (If you forget to do this, I'll probably have to repair the boot partition of Windows files manually using the Windows Recovery Console .)
Newer Installations of Windows use two primary partitions (a small Windows partition and a large boot the Windows OS partition). new installation of Windows uses two primary partitions (small Windows boot partition and the partition of the Windows OS.) Also an Ubuntu Linux installation requires two partitions - a linux-swap partition and the OS partition. An installation of Ubuntu Linux also requires two partitions - linux-swap partition and the OS partition. The Linux partitions cans Either be two primary partitions or cans be two logical partitions Within an extended partition. Linux partitions can be two primary partitions or to two logical partitions in a partition. Some computer retailers use all four partitions on a hard drive. Some computer retailers using all four partitions on your hard drive. Unless there are two free partitions available (Either primary or logical) in the which to install Ubuntu, however, it will from Appear as if 'there is no available free space. Unless there are two free partitions are available (either primary or logical) in which to install Ubuntu, however, it would appear as if there is no free space available. If only one partition on a hard drive cans be made available, it must be Used as an extended partition (in the which multiple logical partitions cans then be created). If only one partition on the hard drive can be made available, should be used as an extended partition (in which multiple logical partitions can then be made). Partition management cans be done using the GParted utility. Partition management can be done by using the GParted utility.
If there are only two existing primary partitions on a hard drive (and plenty of free space on it) then there will of be no problem installing Ubuntu as the second operating system, and it is done automatically from the Ubuntu LiveCD. If there are only two existing primary partition on the hard drive (and a lot of empty space on it), then there would be no problem installing Ubuntu as a second operating system and it is done automatically from the Ubuntu LiveCD. Allow the Ubuntu LiveCD to install to "Largest available free space." Let the Ubuntu LiveCD to install to the "largest free space available." Alternatively, if there is an extended partition with plenty of free space Within it, the Ubuntu LiveCD will from install to this "Largest available free space" as well. Or, if there is an extended partition with lots of empty space in it, then the Ubuntu LiveCD will install it "the largest free space available" as well.
The main Windows partition Should Be at least 20 GB (30 GB recommended for Vista / Windows 7), and a Ubuntu partition at least 10 Gb (20 Gb recommended). The main Windows partition must be at least 20 GB (30 GB recommended for Vista / Windows 7), and the Ubuntu partition at least 10 GB (20GB is recommended). Obviously, if you have plenty of disk space, make the partition for whichever will from some of your larger Favoured operating system. Obviously, if you have a lot of disk space, which will create a partition for your operating system preferably is greater. For a recommended partitioning scheme, see this section. For the recommended partition scheme, see this section.

Conversely cans you install a retail version of Windows (but not an OEM or recovery version) after Ubuntu by creating a primary NTFS partition using GParted. Instead you can install the retail version of Windows (but not the OEM or version recovery) after Ubuntu to create a primary NTFS partition using GParted. (You May have to use GPparted from a Live CD / USB). (You may have to use GPparted of Live CD / USB). Once the primary NTFS partition is created you cans boot your Windows CD / DVD and choose to install Windows to That NTFS partition. After a primary NTFS partition is created, you can boot the Windows CD / DVD and choose to install Windows to the NTFS partition. When installation is complete, reboot to Insure Windows boots properly. After installation is complete, reboot to make sure the Windows boot properly. Once That Is ascertained, use the Ubuntu Live CD / USB to install GRUB to the MBR back. Once it is confirmed, use the Ubuntu Live CD / USB to install GRUB to the MBR. (This is Necessary Because Windows overwrites the MBR and designates its own bootloader as the master boot loader.) Once GRUB is installed you will from be Able to boot Either OS. (This is necessary because Windows will overwrite the MBR and bootloader appoint himself as the master boot loader.) GRUB Once installed, you will be able to boot either OS.

Alternatives include: Alternatives include:

    * Wubi (Windows-based Ubuntu Installer), an Officially Supported That dual-boot installer allows Ubuntu to be mounted in a virtual run-disk Within the Windows environment (the which cause a slight cans Degradation in performance). Wubi (Windows-based Ubuntu Installer), a dual-boot installer officially supported which allows Ubuntu to be installed at run-virtual disk in a Windows environment (which can cause some performance degradation). Because the installation requires an intact functioning Windows system, it is recommended to install Ubuntu in this manner for short-term evaluation purposes only. Because the installation requires a Windows system functions intact, it is recommended to install Ubuntu in this way for short-term evaluation purposes only. A permanent installation Should Be Ubuntu installed in its own partition, with its own filesystem, and Should not Rely on Windows. An Ubuntu installation remains must be installed on its own partition, the filesystem itself, and should not rely on Windows.
    * EasyBCD, a free Windows-based program That allows you to dual-boot Windows Vista and Ubuntu (as well as other operating systems) by configuring the Vista bootloader. EasyBCD, a free Windows-based program that allows you to dual-boot Windows Vista and Ubuntu (and also other operating systems) to configure the Vista bootloader.

source : http://ubuntuguide.org

What is Ubuntu?

Ubuntu is based on the Linux operating system kernel. There are many operating systems use the Linux kernel That (Sometimes these are called "Linux distros"), and Ubuntu is only one of hundreds of these. There are many operating systems that use the Linux kernel (sometimes called "Linux distribution"), and Ubuntu is just one of hundreds of these. I do not recommend Ubuntu to everyone, but here are Some Things That make Ubuntu unique Among Linux distributions: I do not recommend Ubuntu to everyone, but here are some things that make Ubuntu unique among Linux distributions:

    
* Ubuntu is guaranteed to be cost-free. Ubuntu is guaranteed free of charge. Other Linux distributions tend to be cost-free as well, but there exists no subscription or member fee That Gives You Extra in Ubuntu. Other Linux distributions tend to be free of charge as well, but there are no subscription fees or member who gives you extra in Ubuntu. There is no "enterprise edition." There is no "enterprise edition." Ubuntu is Ubuntu, and it's free. Ubuntu is Ubuntu, and it's free. Not only is the operating system free-Canonical earnest Itself Actually ship Ubuntu CDs (worldwide) and pay for the shipping as well. Granted, these CDs shipped Freely cans take around two months to arrive, but you can not really complain if you're not paying for postage. Not only is the operating system itself free Canonical will actually ship Ubuntu CD (worldwide) and pay for shipping as well. Indeed, this free CD sent to take approximately two months to arrive, but you can not really complain if you 're not paying for postage.
    
* Ubuntu and the software it includes are free in Two Ways-they're a cost-free and non-proprietary. Ubuntu and the software is included free in two ways-they are free of charge and non-exclusive. You will not be bogged down with all Sorts of licensing issues, and if you know something about programming, you cans take a look at the source code of the applications and modify Them as you see fit. You will not be jammed with all sorts of licensing issues, and if you know something about programming, you can look at the source code of the application and modify them as you see fit. On the one hand, this is an advantage, as you will not have limits on how many computers you put Ubuntu on. On the one hand, this is an advantage, because you will not have limits on how many computers you put Ubuntu on. On the other hand, you May Rely (much more than you May be aware of) Heavily on proprietary software and wonder why you can not do something you Immediately Used to be Able to do. On the other hand, you can count (more than you might realize) weight on proprietary software and wonder why you can not do anything that you used to be able to do so. In recent releases of Ubuntu, the enabling of proprietary hardware drivers and software multimedia codecs is a matter of A Few clicks. In the latest release of Ubuntu, allowing drivers proprietary hardware and software multimedia codecs is a matter of few clicks. (In Ubuntu 10:10 cans Actually you activate the proprietary codecs with one checkbox before you begin installing the Ubuntu Linux operating system.) (In Ubuntu 10:10 You really can enable the proprietary codecs with one checkbox before you start installing Ubuntu Linux operating system.)
    
* Ubuntu tries to make the installation of the operating system as simple as possible-one user (at least initially cans-you add more users later), one password, one application per task, one CD for the entire operating system. Ubuntu tries to make the installation of the operating system as simple as possible-one user (at least initially, you can add more users later), a password, one application per task, one CD for the operating system as a whole.
    
* The forums have quick response times, helpful users and staff, and a lot of good customization tips and tricks. Forum has a fast response time, helping users and staff, and lots of tips and tricks good customization. It's a friendly, supportive environment, in accordance with Ubuntu's philosophy of being "Linux for Human Beings" humanity to others. This is the environment, friendly support, in accordance with the philosophy of Ubuntu to be "Linux for Humans" humanity to others. The forums are run entirely by volunteers and fellow users. Forum is run entirely by volunteers and fellow users. They are not paid employees of Canonical. They are not paid employees of Canonical.
Some people view these characteristics as advantages. Some see this characteristic as an advantage. Them others view as disadvantages. Others see it as a deficiency.
Even though Ubuntu comes with a lot of productivity software-an office suite, a music player, a photo editor, an instant messaging program, an email client, an internet browser, etc.-many people like Their proprietary software to "just work" out of the box. That will not Happen in Ubuntu. If You Want to play commercial DVDs, have MP3 support, or view Flash movies in your Internet browser, you'll have to enable proprietary software does not include That Ubuntu by default. Although many suites Ubuntu-office productivity software, music player, image editor, instant messaging program, email client, Internet browser, etc.-lots of people like their proprietary software to "work" out of the box. That will not happen in Ubuntu. If you want to play commercial DVDs, have support for MP3, or view Flash movies in your Internet browser, you must activate the proprietary software that Ubuntu does not include by default. There are guides (like this one) for enabling these proprietary codecs. There are guides (like this one) to allow these proprietary codecs. Ubuntu has an easy codec installation, making the process of enabling these codecs ... Ubuntu has a codec installation easy, make this process allows the codec ... a Little Easier. little easier.
Of course, there are other installments Also That Linux distributions have proprietary formats built into Them: Linux Mint, Mepis, and PCLinuxOS, for example. Of course, there are also some other Linux distributions that have built into their proprietary format: Linux Mint, Mepis, and PCLinuxOS, for example.
Regular release cycles mean Generally improved software. regular release cycle generally means software upgrades. Regular improvements breed instability, though. Regular repair instability breed, though. Even if you upgrade from Windows Vista to Windows 7 or from Mac OS X Leopard to Mac OS X Snow Leopard, May you notice Some glitches here and there. Even if you upgrade from Windows Vista to Windows 7 or from Mac OS X Leopard for Mac OS X Snow Leopard, you may see some problems here and there. Likewise, if you upgrade your Ubuntu operating system every six months, May you find the upgrade process a bit wearying, especially if you upgrade on or before the official release day. Likewise, if you upgrade your Ubuntu operating system every six months, you may find the process of upgrading a bit tiring, especially if you upgrade on or before the day of the official release. For those WHO like a Linux distribution with a lot of stability and infrequent upgrades, Debian May be a better choice Than Ubuntu. For those who like a Linux distribution with a lot and rarely upgraded stability, Debian can be a better choice than Ubuntu. Also Ubuntu has LTS (long-term support) releases That will from the receive security updates for three years, so you do not have to upgrade every six months if you do not Want To. Ubuntu also has the LTS (long term support) release will receive security updates for three years, so you do not need to upgrade every six months if you do not want. (By the way, non-LTS Ubuntu releases get security updates for 18 months.) (By the way, non-LTS Ubuntu releases get security updates for 18 months.)
I think a lot of Ubuntu earnest advocates agree with me Pls Should I say you use the operating system best suits your needs That. I think many supporters of Ubuntu will agree with me when I say you must use an operating system that best suits your needs. Ubuntu May be that, but there are other Linux distributions out there, and you May be better off with a non-Linux operating system (a Windows or Mac operating system, for example). Ubuntu might be that, but there are other Linux distributions out there, and you might be better with non-Linux operating system (Windows or Mac operating system, for example).

suource :  http://www.psychocats.net

Accessing MS-DOS files

If, for some twisted and bizarre reason, you want to access files from MS-DOS, it's easily done under Linux.
    The usual way to access MS-DOS files is to mount an MS-DOS partition or floppy under Linux, allowing you to access the files directly through the file system. For example, if you have an MS-DOS floppy in /dev/fd0, the command
tscreen2755
will mount it under /mnt. See Section 4.8.4 for more information on mounting floppies.
You can also mount an MS-DOS partition of your hard drive for access under Linux. If you have an MS-DOS partition on /dev/hda1, the command
tscreen2760
mounts it. Be sure to umount the partition when you're done using it. You can have a MS-DOS partition automatically mounted at boot time if you include the entry in /etc/fstab. See Section 4.4 for details. The following line in /etc/fstab will mount an MS-DOS partition on /dev/hda1 on the directory /dos.
tscreen2768
You can also mount the VFAT file systems that are used by Windows 95:
tscreen2770
This allows access to the long filenames of Windows 95. This only applies to partitions that actually have the long filenames stored. You can't mount a normal FAT16 file system and use this to get long filenames.
  The Mtools software may also be used to access MS-DOS files. The commands mcd, mdir, and mcopy all behave like their MS-DOS counterparts. If you install Mtools, there should be manual pages available for these commands.
      Accessing MS-DOS files is one thing; running MS-DOS programs is another. There is an MS-DOS Emulator under development for Linux; it is widely available, and included in most distributions. It can also be retrieved from a number of locations, including the various Linux FTP sites listed in Appendix B. The MS-DOS Emulator is reportedly powerful enough to run a number of applications, including WordPerfect, from Linux. However, Linux and MS-DOS are vastly different operating systems. The power of any MS-DOS emulator under UNIX is limited. In addition, a Microsoft Windows emulator that runs under X Windows is under development. 

sumber : http://tldp.org

Basic Linux concepts

Linux is a multitasking, multiuser operating system, which means that many people can run many different applications on one computer at the same time. This differs from MS-DOS, where only one person can use the system at any one time. Under Linux, to identify yourself to the system, you must log in, which entails entering your login name (the name the system uses to identify you), and entering your password, which is your personal key for logging in to your account. Because only you know your password, no one else can log in to the system under your user name.
On traditional UNIX systems, the system administrator assigns you a user name and an initial password when you are given an account on the system. However, because in Linux tt you are the system administrator, you must set up your own account before you can log in. For the following discussions, we'll use the imaginary user name, ``larry.''
  In addition, each system has a host name assigned to it. It is this host name that gives your machine a name, gives it character and charm. The host name is used to identify individual machines on a network, but even if your machine isn't networked, it should have a host name. For our examples below, the system's host name is ``mousehouse''.

Creating an account.

      Before you can use a newly installed Linux system, you must set up a user account for yourself. It's usually not a good idea to use the root account for normal use; you should reserve the root account for running privileged commands and for maintaining the system as discussed below.
In order to create an account for yourself, log in as root and use the useradd or adduser command. See Section 4.6 for information on this procedure.

Logging in.

    At login time, you'll see a prompt resembling the following:

tscreen2360
Enter your user name and press the Enter key. Our hero, larry, would type:

tscreen2364
Next, enter your password. The characters you enter won't be echoed to the screen, so type carefully. If you mistype your password, you'll see the message
tscreen2366
and you'll have to try again.
Once you have correctly entered the user name and password, you are officially logged in to the system, and are free to roam.

Virtual consoles.

    The system's console is the monitor and keyboard connected directly to the system. (Because Linux is a multiuser operating system, you may have other terminals connected to serial ports on your system, but these would not be the console.) Linux, like some other versions of UNIX, provides access to virtual consoles (or VCs), that let you have more than one login session on the console at one time.
To demonstrate this, log in to your system. Next, press Alt-F2. You should see the login: prompt again. You're looking at the second virtual console. To switch back to the first VC, press Alt-F1. Voila! You're back to your first login session.
A newly-installed Linux system probably lets you to access only the first half-dozen or so VCs, by pressing Alt-F1 through Alt-F4, or however many VCs are configured on your system. It is possible to enable up to 12 VCs--one for each function key on your keyboard. As you can see, use of VCs can be very powerful because you can work in several different sessions at the same time.
While the use of VCs is somewhat limiting (after all, you can look at only one VC at a time), it should give you a feel for the multiuser capabilities of Linux. While you're working on the first VC, you can switch over to the second VC and work on something else.

Shells and commands.

    For most of your explorations in the world of Linux, you'll be talking to the system through a shell, a program that takes the commands you type and translates them into instructions to the operating system. This can be compared to the COMMAND.COM program under MS-DOS, which does essentially the same thing. A shell is just one interface to Linux. There are many possible interfaces--like the X Window System, which lets you run commands by using the mouse and keyboard.
As soon as you log in, the system starts the shell, and you can begin entering commands. Here's a quick example. Larry logs in and is waiting at the shell prompt.
tscreen2386
  The last line of this text is the shell's prompt, indicating that it's ready to take commands. (More on what the prompt itself means later.) Let's try telling the system to do something interesting:

tscreen2389
Well, as it turns out, make is the name of an actual program on the system, and the shell executed this program when given the command. (Unfortunately, the system was being unfriendly.)
      This brings us to the burning question: What is a command? What happens when you type ``make love''? The first word on the command line, ``make'', is the name of the command to be executed. Everything else on the command line is taken as arguments to this command. Example:
tscreen2397
The name of this command is ``cp'', and the arguments are ``foo'' and ``bar''.
When you enter a command, the shell does several things. First, it checks the command to see if it is internal to the shell. (That is, a command which the shell knows how to execute itself. There are a number of these commands, and we'll go into them later.) The shell also checks to see if the command is an alias, or substitute name, for another command. If neither of these conditions apply, the shell looks for a program, on disk, having the specified name. If successful, the shell runs the program, sending the arguments specified on the command line.
In our example, the shell looks for a program called make, and runs it with the argument love. Make is a program often used to compile large programs, and takes as arguments the name of a ``target'' to compile. In the case of ``make love'', we instructed make to compile the target love. Because make can't find a target by this name, it fails with a humorous error message, and returns us to the shell prompt.
    What happens if we type a command to a shell and the shell can't find a program having the specified name? Well, we can try the following:
tscreen2411
Quite simply, if the shell can't find a program having the name given on the command line (here, ``eat''), it prints an error message. You'll often see this error message if you mistype a command (for example, if you had typed ``mkae love'' instead of ``make love'').

Logging out.

    Before we delve much further, we should tell you how to log out of the system. At the shell prompt, use the command
tscreen2419
to log out. There are other ways of logging out, but this is the most foolproof one.

Changing your password.

    You should also know how to change your password. The command passwd prompts you for your old password, and a new password. It also asks you to reenter the new password for validation. Be careful not to forget your password--if you do, you will have to ask the system administrator to reset it for you. (If you are the system administrator, see page gif.)

Files and directories.

  Under most operating systems (including Linux), there is the concept of a file, which is just a bundle of information given a name (called a filename). Examples of files might be your history term paper, an e-mail message, or an actual program that can be executed. Essentially, anything saved on disk is saved in an individual file.
  Files are identified by their file names. For example, the file containing your history paper might be saved with the file name history-paper. These names usually identify the file and its contents in some form that is meaningful to you. There is no standard format for file names as there is under MS-DOS and some other operating systems; in general, a file name can contain any character (except the / character--see the discussion of path names, below) and is limited to 256 characters in length.
  With the concept of files comes the concept of directories. A directory is a collection of files. It can be thought of as a ``folder'' that contains many different files. Directories are given names, with which you can identify them. Furthermore, directories are maintained in a tree-like structure; that is, directories may contain other directories.
  Consequently, you can refer to a file by its path name, which is made up of the filename, preceded by the name of the directory containing the file. For example, let's say that Larry has a directory called papers, which contains three files: history-final, english-lit, and masters-thesis. Each of these three files contains information for three of Larry's ongoing projects. To refer to the english-lit file, Larry can specify the file's pathname, as in:
tscreen2442
  As you can see, the directory and filename are separated by a single slash (/). For this reason, filenames themselves cannot contain the / character. MS-DOS users will find this convention familiar, although in the MS-DOS world the backslash (\) is used instead.
  As mentioned, directories can be nested within each other as well. For example, let's say that there is another directory within papers, called notes. The notes directory contains the files math-notes and cheat-sheet. The pathname of the file cheat-sheet would be
tscreen2454
    Therefore, a path name is really like a path to the file. The directory that contains a given subdirectory is known as the parent directory. Here, the directory papers is the parent of the notes directory.

The directory tree.

            Most Linux systems use a standard layout for files so that system resources and programs can be easily located. This layout forms a directory tree, which starts at the ``/'' directory, also known as the ``root directory''. Directly underneath / are important subdirectories: /bin, /etc, /dev, and /usr, among others. These directories in turn contain other directories which contain system configuration files, programs, and so on.
    In particular, each user has a home directory, which is the directory set aside for that user to store his or her files. In the examples above, all of Larry's files (like cheat-sheet and history-final) are contained in Larry's home directory. Usually, user home directories are contained under /home, and are named for the user owning that directory. Larry's home directory is /home/larry.
The diagram on page gif shows a sample directory tree, which should give you an idea of how the directory tree on your system is organized.
=1.0pt
  figure2482
Figure 3.1: A typical (abridged) Linux directory tree.

The current working directory.

At any moment, commands that you enter are assumed to be relative to your current working directory. You can think of your working directory as the directory in which you are currently ``located''. When you first log in, your working directory is set to your home directory--/home/larry, in our case. Whenever you refer to a file, you may refer to it in relationship to your current working directory, rather than specifying the full pathname of the file.
Here's an example. Larry has the directory papers, and papers contains the file history-final. If Larry wants to look at this file, he can use the command
tscreen2497
The more command simply displays a file, one screen at a time. However, because Larry's current working directory is /home/larry, he can instead refer to the file relative to his current location by using the command
tscreen2502
  If you begin a filename (like papers/final) with a character other than /, you're referring to the file in terms relative to your current working directory. This is known as a relative path name.
    On the other hand, if you begin a file name with a /, the system interprets this as a full path name--that is, a path name that includes the entire path to the file, starting from the root directory, /. This is known as an absolute path name.

Referring to home directories.

      Under both tcsh and bashgif you can specify your home directory with the tilde character (~). For example, the command
tscreen2525
is equivalent to
tscreen2497
The shell replaces the ~ character with the name of your home directory.
You can also specify other user's home directories with the tilde character. The pathname ~karl/letters translates to /home/karl/letters by the shell (if /home/karl is karl's home directory). Using a tilde is simply a shortcut; there is no directory named ~--it's just syntactic sugar provided by the shell.


sumber : http://tldp.org

What Is Linux?

In the early 90s, a geek named Linus Torvalds at the University of Helsinki in Finland thought it would be fun to write a Unix kernel from scratch. He called it Linux, and it was cool but pretty much useless without all the utility programs needed to make it a complete operating system. At the same time, Richard Stallman and his pals at the Free Software Foundation were writing a bunch of freeware Unix utilities collectively known as the GNU Project. It was cool but pretty much useless without a kernel to make it a complete operating system. News of Linux spread quickly over the Internet, and many other Unix programmers joined the effort to enhance it. What we now know as Linux is a combination of Torvald's Linux kernel, the GNU Project software, and some other nifty software bit and pieces developed by programmers from all around the world.
Today Linux is a complete and reliable implementation of the Unix operating system, with the following notable features:
  • 32-bit or 64-bit operation (it uses all the speed and power of your CPU)
  • Virtual memory (it can use all of your system's RAM)
  • Full support for X Windows (Unix's standard graphical user interface)
  • TCP/IP networking support (allowing connection to the Internet)
  • GNU software support (including a huge amount of free Unix software from the GNU Project)
Note: GNU is one of those recursive acronyms that computer scientists love; it stands for GNU's Not Unix. The GNU Project is an effort sponsored by the Free Software Foundation to provide freely available Unix software. See http://www.gnu.org for related information.
Linux was written totally from scratch without using any of the original AT&T UNIX code. (Throughout this site, UNIX refers to the original trademarked UNIX project invented by AT&T. The term Unix is used here as a generic term for other variants of the operating system.)
Because of that (and because the author is a nice guy), Linux is free. You can obtain the source code, modify, sell or give away the software so long as you provide full source code and don't impose any restrictions on what others do with it.