Bookmark the site

Return to Homepage


US Shopping
UK Shopping



 










Books : Linux Pocket Guide (Pocket Guide: Essential Commands)



Search Books - select a category

Buy Linux Pocket Guide (Pocket Guide: Essential Commands) online at Discounted New and Used prices. Delivered to your door with Off-The-Bookshelf.
See Larger Image

Linux Pocket Guide (Pocket Guide: Essential Commands)

by: Daniel Barrett

List Price: £6.95
Off The Bookshelf's Price: £5.56
You Save: £1.39 (20%)
Prices subject to change.



Availability: Usually dispatched within 24 hours Binding: Paperback
Dewey Decimal Number: 005.432
EAN: 9780596006280
ISBN: 0596006284
Label: O'Reilly Media, Inc.
Manufacturer: O'Reilly Media, Inc.
Number Of Items: 1
Number Of Pages: 224
Publication Date: February 18, 2004
Publisher: O'Reilly Media, Inc.
Studio: O'Reilly Media, Inc.
Sales Rank: 2268




Related Items: Browse for similar items by category:
Related Items:
Linux in a Nutshell (In a Nutshell (O'Reilly)) Linux in Easy Steps (In Easy Steps) vi Editor Pocket Reference (Pocket Reference (O'Reilly)) Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix Beginning Ubuntu Linux: Book/DVD Package 2nd Editon: From Novice to Professional (Beginning from Novice to Professional) see more


Editorial Review:

Linux User & Developer
Cleverly avoiding the unnecessary bloat associated with titles that share the same subject matter

Product Description:
O'Reilly's Pocket Guides have earned a reputation as inexpensive, comprehensive, and compact guides that have the stuff but not the fluff. Every page of Linux Pocket Guide lives up to this billing. It clearly explains how to get up to speed quickly on day-to-day Linux use. Once you're up and running, Linux Pocket Guide provides an easy-to-use reference that you can keep by your keyboard for those times when you want a fast, useful answer, not hours in the man pages. Linux Pocket Guide is organized the way you use Linux: by function, not just alphabetically. It's not the 'bible of Linux; it's a practical and concise guide to the options and commands you need most. It starts with general concepts like files and directories, the shell, and X windows, and then presents detailed overviews of the most essential commands, with clear examples. You'll learn each command's purpose, usage, options, location on disk, and even the RPM package that installed it. The Linux Pocket Guide is tailored to Fedora Linux--the latest spin-off of Red Hat Linux--but most of the information applies to any Linux system. Throw in a host of valuable power user tips and a friendly and accessible style, and you'll quickly find this practical, to-the-point book a small but mighty resource for Linux users.

Synopsis:
O'Reilly's Pocket Guides have earned a reputation as inexpensive, comprehensive, and compact guides that have the stuff but not the fluff. Every page of Linux Pocket Guide lives up to this billing. It clearly explains how to get up to speed quickly on day-to-day Linux use. Once you're up and running, Linux Pocket Guide provides an easy-to-use reference that you can keep by your keyboard for those times when you want a fast, useful answer, not hours in the man pages. Linux Pocket Guide is organized the way you use Linux: by function, not just alphabetically. It's not the 'bible of Linux; it's a practical and concise guide to the options and commands you need most. It starts with general concepts like files and directories, the shell, and X windows, and then presents detailed overviews of the most essential commands, with clear examples. You'll learn each command's purpose, usage, options, location on disk, and even the RPM package that installed it. The Linux Pocket Guide is tailored to Fedora Linux--the latest spin-off of Red Hat Linux--but most of the information applies to any Linux system.

Throw in a host of valuable power user tips and a friendly and accessible style, and you'll quickly find this practical, to-the-point book a small but mighty resource for Linux users.

About the Author:
Dan Barrett has been immersed in Internet technology since 1985. Currently working as a software engineer, Dan has also been a heavy metal singer, Unix system administrator, university lecturer, web designer, and humorist. He is the co-author of Linu

Excerpted from Linux Pocket Guide by Daniel J. Barrett. Copyright © 2004. Reprinted by permission. All rights reserved.:
Programming with Shell Scripts

Earlier when we covered the shell (bash), we said it had a programming language built in. In fact, you can write programs, or shell scripts, to accomplish tasks that a single command cannot. Like any good programming language, the shell has variables, conditionals (if-then-else), loops, input and output, and more. Entire books have been written on shell scripting, so we’ll be covering the bare minimum to get
you started. For full documentation, run info bash.

Whitespace and Linebreaks
bash shell scripts are very sensitive to whitespace and linebreaks. Because the "keywords" of this programming language are actually commands evaluated by the shell, you need to separate arguments with whitespace. Likewise, a linebreak in the middle of a command will mislead the shell into thinking the command is incomplete. Follow the conventions we present here and you should be fine.

Variables
We described variables earlier:

$ MYVAR=6
$ echo $MYVAR
6

All values held in variables are strings, but if they are numeric the shell will treat them as numbers when appropriate.

$ NUMBER="10"
$ expr $NUMBER + 5
15

When you refer to a variable’s value in a shell script, it’s a good idea to surround it with double quotes to prevent certain runtime errors. An undefined variable, or a variable with spaces in its value, will evaluate to something unexpected if not surrounded by quotes, causing your script to malfunction.

$ FILENAME="My Document" Space in the name
$ ls $FILENAME Try to list it
ls: My: No such file or directory Oops! Ls saw 2 arguments
ls: Document: No such file or directory
$ ls -l "$FILENAME" List it properly
My Document ls saw only 1 argument

If a variable name is evaluated adjacent to another string, surround it with curly braces to prevent unexpected behavior:

$ HAT="fedora"
$ echo "The plural of $HAT is $HATs"
The plural of fedora is Oops! No variable "HATs"
$ echo "The plural of $HAT is s"
The plural of fedora is fedoras What we wanted
Input and Output
Script output is provided by the echo and printf commands, which we described in "Screen Output" on page 144:

$ echo "Hello world"
Hello world
$ printf "I am %d years old\n" `expr 20 + 20`
I am 40 years old

Input is provided by the read command, which reads one line from standard input and stores it in a variable:

$ read name
Sandy Smith
$ echo "I read the name $name"
I read the name Sandy Smith

Booleans and Return Codes
Before we can describe conditionals and loops, we need the concept of a Boolean (true/false) test. To the shell, the value 0 means true or success, and anything else means false or failure.

Additionally, every Linux command returns an integer value, called a return code or exit status, to the shell when the command exits. You can see this value in the special variable $?:

$ cat myfile
My name is Sandy Smith and
I really like Fedora Linux
$ grep Smith myfile
My name is Sandy Smith and A match was found...
$ echo $?
0 ...so return code is "success"
$ grep aardvark myfile
$ echo $? No match was found...
1 ...so return code is "failure"

The return codes of a command are usually documented on its manpage.



Customer Reviews
Average Rating:  out of 5 stars

Rating: 5 out of 5 stars - Works for everyone & most mainstream flavours of Linux
So many books are thick, wordy, and conceal their nuggets of wisdom, but not this one. It's not big, so you won't find full details on (eg) all of the many Linux email clients - but they get a mention.
Works well for me (ex BSD 4.x sysop in the 1980s) as well as friends with no previous knowledge of operating systems. It's the examples that are such a help - most of the things we've needed to do are covered with a brief, relevant example. We use it with Ubuntu mainly - Debian distros are not identical to Fedora but we've not seen a problem - both are Linux and conform to the POSIX standard.
Reading it cover-to-cover is logical, informative, and highly recommended. Three times, and the info is starting to stick..... Then keep ... Read More:



Rating: 5 out of 5 stars - Best command line deskside Linux guide
If you do choose to explore the command line interface of Linux this may be the only book you need buy. True, if you are setting up a network or a LAMP server you will need much more, but if your goal is to gain an insight into what goes on under the hood of Linux or you just need an aide memoire for common Linux commands, this is the best book available. Written in a style that works both as a tutorial and a reference work its only real weakness is the absence of a simple quick reference guide to Linux commands - you have to rely on the index. Although it aims at a Fedora audience, there is probably no user of any other distro that won't find this book worth the purchase price. And it's a very convenient size to literally slip into your pocket.



Rating: 5 out of 5 stars - Indispensable
Ever spent hours on the Web trying to find an accurate, comprehensive set of most-used *nix commands and features? This book saves you all that time. For its size, it is quite an achievement - nicely written and laid out. Always within arm's reach here.



Rating: 5 out of 5 stars - No nonsense
If you just want to know how to use linux in 10 mins, this is the book for you. Teaches you what you need to know, without getting caught up in any specifics. As well as teaching you all the standard linux commands (and some application specific ones for RedHat), this book gives a brief overview about other things you'll need to understand about linux, such as how the file system works. Recommended.



Rating: 5 out of 5 stars - Excellent
I don't envy Mr Barrett's task with this book. Everybody has a slightly different wishlist of commands to go in a book like this; it's impossible to please everybody. That said, I think he's got it about as close to perfection as possible. This book has an incredible amount of useful info in a usefully small volume. If like me you can normally remember the command, but always struggle to remember the right option (which one do you add to TAR for BZ2 files?) this book is a godsend.


 



Off The Bookshelf.co.uk gives you a unique shopping experience, you can find all the Books products you like within a few minutes online, locate the latest charting CD's, DVD's & Games, read Books reviews on the bestselling Books Books and Books products. All Books are available to buy Used (at a greater saving) or New (at a great discounted RRP). Add the Books items you would like to your shopping basket, pay securely online and we send these products to be delivered to your door. We take great pride in being able to offer you the great savings partnering with Amazon, offering you cheaper prices than the high street retailers, we have thousands of discounts on all the the Books's you can buy off the shelf and hope you find the website easy to use.

Thanks for visiting and browsing Off The Bookshelf.co.uk


 

In association with Amazon.co.uk
SME-WS
HolidayHavens - Holiday Rental Accommodation