htop: new generation Linux processes viewer

Saturday, November 3, 2007

As it comes from htop’s manual page, htop is free (GPL) ncurses-based process viewer, that is similar to top, but allows to scroll the list vertically and horizontally to see all processes and their full command lines. Tasks related to processes (killing, renicing) can be done without entering their PIDs.

I found this utility very useful and powerful in my everyday working process. Here is the comparison between htop and oldie top (taken from htop’s site):

1.In 'htop' you can scroll the list vertically and horizontally to see all processes and complete command lines.

2.In 'top' you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident).

3.'htop' starts faster ('top' seems to collect data for a while before displaying anything).

4.In 'htop' you don't need to type the process number to kill a process, in 'top' you do.

5.In 'htop' you don't need to type the process number or the priority value to renice a process, in 'top' you do.

6.'htop' supports mouse operation, 'top' doesn't

7.'top' is older, hence, more used and tested.

As usual it’s possible to install htop in Ubuntu by single command: sudo aptitude install htop.

Interactive Linux kernel map

As it comes from name of the post, here is interactive Linux kernel map I recently came across. It’s available as web application as well as html version. I think you understand who it may be useful for… Good luck in programming...

full pic here

Linux distro timeline 1992-2007

It was started with Linus' announcement:

Hello everybody out there using minix - I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things). I've currently ported bash (1.08) and gcc (1.40), and things seem to work. This implies that I'll get something practical within a few months, and I'd like to know what features most people would want. Any suggestions are welcome, but I won't promise I'll implement them Linus (PS. Yes - it’s free of any minix code, and it has a multi-threaded fs. It is NOT portable (uses 386 task switching etc.), and it probably never will support anything other than AT-harddisks, as that’s all I have :-(.”

And today it’s timeline is shown at 2003x2841 image…Click on the image for a larger version..

Click here for larger version

Google phone (GPhone) rumors

Friday, November 2, 2007

"Google’s first mobile phone will run a Linux operating system on a Texas Instruments "Edge" chipset, and will likely ship to T-Mobile and Orange customers in the Spring of 2008, according to unconfirmed reports. "GPhone" call minutes and text messages reportedly will be funded by mobile advertising…

News of the so-called "GPhone" or "G-Phone" broke quietly about two weeks ago in the island nation of Singapore, where Jennifer Tan of Reuters subsidiary Anian Research filed a report on July 12.

Tan cited "industry sources," "U.S. sources," and "manufacturing and component supply chain sources" in backing her assertion that after year-long delays finding a manufacturer, Google contracted Taiwan-based smartphone maker High Tech Computer (HTC) to design its phone hardware. HTC is best-known for its Windows Mobile smartphones, however, and Tan offered no conjecture about who might supply the phone’s Linux-based operating system.

Additional details reported by Tan include:

* The G-Phone will have a large color screen with a predictive Qwerty keypad to simplify Google searching
* A follow-up 3G-capable model (Edge is considered "2.75G") will use a Qualcomm chipset
* Scheduled for production in Q1 of 2006, the Google phone will hit retail shelves next spring
* Call minutes and text messages are to be funded by "mobile advertising"
* Google originally hoped to launch a phone this year, but was delayed by "difficulties in nailing down a deal with a handset maker"
* T-Mobile will carrier the phone in the U.S., along with (possibly) Orange in other markets

Tan quotes Susquehanna Financial Group analyst Marianne Wolk as having said, "A mobile offering would be consistent with Google’s goal to make search accessible. We believe Google would design a solution to facilitate greater use of Google Search and other applications like Google Talk, Gmail, Google Maps, encourage wireless video, and leverage this usage to hasten the market for mobile advertising."

Google itself has declined to comment on rumors it plans to produce a phone, Tan reported."

What is a Linux guy doing at Sun?

As part of Sun Microsystems' first CommunityOne, Ian Murdock, Sun’s chief operating system platform strategist and a self-described "Linux guy", hosted a noteworthy session that explored a curious question: How can we make Solaris a better Linux than Linux? Murdock has a storied history in relation to Linux. A Linux user, developer, and advocate since 1993, he founded Debian in 1993, with the goal of creating a complete operating system around the Linux kernel and expanding Linux to a broader audience. In 1999, he co-founded Progeny, a Linux distribution vendor that focused on customization for appliance environments. He was CTO of the Linux Foundation (formerly known as the Free Standards Group) from 2005-2007, and has been chair of the Linux Standards Base from 2005 to the present.

read more

Linux Halloween! [pic]

our friendly neighbourhood pengiun strikes again!

digg it

Engineering Students Build Next-Generation Bathyscaphe

Thursday, November 1, 2007

Computer, electrical, and mechanical engineering students at the University of Florida have built a fully automated underwater vehicle. Driven by five thrusters and controlled by complex electronics, the bathyscaphe can locate the source of sounds, investigate leaking pipes, and perform other civilian and military tasks that would be too dangerous for manned submergibles, especially during an emergency such as a hurricane .
A Russian submarine is trapped at the bottom of the sea, hurricanes crumble weak levees, and pipes leak. Most of these situations are too dangerous to send in a diver to investigate, but robots are becoming a reality. The military is using them on a daily basis, and now, the newest wave of robots may be diving into the ocean.

"You don't want to put somebody in the water. That's some of the worst, harshest environments. You can instead have a robot do it," says Eric Schwartz, an electrical and computer engineer at the University of Florida in Gainesville.

University of Florida computer, electrical and mechanical engineering students built the future of robotic underwater vehicles, called the SubjuGator. It's a submarine that's completely autonomous, working without any human involvement, and is controlled by 10 microprocessors and one computer. The key components are five thrusters and a highly involved electronics unit.

UF students tested it in a pool and trained it to locate underwater sounds, as well as breaks in pipelines or walls.

"We can go every other way. We can go forward. We can turn this way and that way. We can rotate about this axis..." Schwartz says. "It's programmed. It's basically trained you're trained. We say this is what a pipe looks like. This is what a pipe doesn't look like. This is what a box looks like."

From there, the SubjuGator can track down what it's looking for. And one day a sub like this could help to rescue trapped sailors, repair levees, and find oil leaks before any damage is done.

The applications for a sub like the subjugator are endless. According to Schwartz, they could help tap into oil in the ocean and even run undercover missions for the Navy.

MySpace and Google Join Forces to Launch Open Platform for Social Application Development

MySpace, the world's largest social network, and Google, Inc. (NASDAQ: GOOG) today announced that they are joining forces to launch OpenSocial— a set of common APIs for building social applications across the web. The partnership spearheads an initiative to standardize and simplify the development of social applications. Today's announcement underscores MySpace's commitment to supporting standards that foster innovation in an increasingly social Web.

Demo of a MySpace webpage using OpenSocial, a programming model developed at Google

"Our partnership with Google allows developers to gain massive distribution without unnecessary specialized development for every platform," said Chris DeWolfe, Chief Executive Officer and co-founder of MySpace. "This is about helping the start-up spend more time building a great product rather than rebuilding it for every social network. We're pleased to collaborate with Google to establish a landmark standard for social applications."

As a founding member of OpenSocial, MySpace will provide critical user mass and platform guidance. The OpenSocial standards are designed to evolve through contribution from the open source community and as new features are developed by various partners. Global members of the OpenSocial community include, Friendster, hi5, Hyves, imeem, LinkedIn, Ning, Oracle, orkut, Plaxo,, Six Apart, Tianji, Viadeo, and XING.

"As the most trafficked website in the country and the most popular social network in the world, MySpace is one of the leading forces in the global social Web," said Dr. Eric Schmidt, Chairman of the Executive Committee and Chief Executive Officer of Google. "We're thrilled to grow our strategic relationship with MySpace by joining forces on this important initiative."

"As an application developer, we're excited to see MySpace adopting the OpenSocial standard for social application development," said Joe Greenstein, CEO of Flixster. "Application developers have been working with MySpace for a long time—this takes what we can do together to a whole new level. The sheer scale of MySpace makes this extremely exciting for us."

"We're all citizens of a larger Web—no network is an island onto itself," said Aber Whitcomb, CTO of MySpace. "We look forward to continuing to develop great technology with Google and all of the OpenSocial participants. It's exciting that social networks are getting social with each other."

The launch of OpenSocial is the first release of technical details for the forthcoming MySpace Platform. Starting tonight, developers can start writing applications for OpenSocial at which the MySpace Platform will support at launch.

New Software Helps Track the Path of Toxic Spills

Ecological engineers have developed software that can model the path of a toxic spill in waterways anywhere in the United States. The system can predict if and when a contaminant will reach a drinking water intake, and whether its concentration will be high enough to be a threat. The data base covers more than 300 potential water contaminants, and can be used to alert first responders of potential risks.
If our drinking water supply is contaminated, accidentally or intentionally, a spill response team goes to work, getting the situation under control as quickly as possible. Now new computer software is helping make the response even quicker -- all across the country.

"The first thing we want to do is find out how big of a threat it is," Doug Stolz, of Olympia, Washington's, Hazardous Materials Spill Response Team, tells DBIS. "We want to assess the threat, determine what the material is, and what its characteristics are."

Testing the water helps answer those questions. New software will help even more. Ecological engineer Douglas Ryan helped develop the Incident Command (IC) Water Tool. It shows a contaminant moving through water in real time.

"It puts the information that the incident commanders and the first responders need in their hands quickly enough that they can take action to protect the public at times when time is really critical," Ryan, of the USDA Forest Service, tells DBIS.

The IC Water Tool answers these four questions: Where's the contaminant going? Is there a drinking water intake along the path? If there is, when will the contaminant reach it? And will the contaminant's level be high enough to be a threat to people?

Ryan says, "Right now, that sort of information is scattered in many different places. And to pull it together quickly to be of use to incident commanders takes time and they often don't have that time."

The IC Water Tool can get the information to first responders anywhere in the country making our drinking water safer, quicker. The database covers more than 300 types of potential water contaminants. The software has maps of anywhere a contaminant can enter the water system and each location of where drinking water comes from nationwide. The Department of Defense is distributing the tool.

New Computer Architecture Aids Emergency Response

Princeton researchers have invented a computer architecture that enables the secure transmission of crucial rescue information to first responders during events such as natural disasters, fires or terrorist attacks.
Electrical engineering professor Ruby Lee said the new architecture allows for what she describes as "transient trust" -- the ability to transmit sensitive information to parties on an as-needed basis so that it cannot be intercepted by others and so that access stops as soon as the recipient no longer has a legitimate need for it.

Data provided on a transient-trust basis might include floor plans of a building, medical information about occupants, or satellite maps of a given area.

The new SP (Secret Protection) computer architecture relies on two new elements that are embedded in the hardware of an electronic device: a "device root key" and a "storage root hash."

A trusted authority such as a municipal Fire Department would initialize a device -- for example, a PDA used by a firefighter -- with these features so that during an emergency a firefighter could be given access to relevant floor plans, security codes or other essential information. Once the emergency was over, the access to this sensitive information would end.

This new research emerged from the Princeton Architecture Lab for Multimedia and Security (PALMS) led by Lee, the Forrest G. Hamrick Professor of Engineering. The lab's major focus is "clean-slate" computer architecture design. As chief computer architect at Hewlett-Packard, Lee was a key figure in a revolution in computer architecture that swept through the industry in the 1980s. Since coming to Princeton, Lee has been working to revolutionize computer architecture again.

"Computers were not originally designed with security as a goal," said Lee. "I'm trying to rethink the design of computers so they can be trustworthy while at the same time retain all their original design goals, such as high performance, low cost and energy efficiency."

Lee aims to build fundamental security features directly into the hardware of a device, whether it is a personal computer, cell phone or PDA. Her researchers are working to build "trust anchors" into computer hardware to which different software can be tethered, to provide important security coverage.

Lee said that many researchers do not think it is possible to build security features into computer hardware without slowing the computer down or causing it to consume lots of power. However, research done by her lab demonstrates that this is not the case.

"Our research shows that these hardware 'roots of trust' are actually quite deployable on consumer devices like desktop computers or PDAs, and also in sensor networks and larger servers," said Lee. The work is part of the SecureCore multi-university research project, funded by the NSF Cybertrust program and DARPA, which aims to integrate essential security into the hardware, software and networking at the core of commodity computing and communications devices.

In addition to trust anchors for software, Lee is also researching hardware "safety nets" to defend against software vulnerabilities that remote attackers exploit to gain entry into a computer. The ultimate goal is to inoculate individual computers and electronic devices such as cell phones against threats like viruses, worms and bots so that they cannot infect, or be used to attack, other machines.

A paper describing the new architecture by Lee and her graduate student Jeffrey Dwoskin will be presented Wed., Oct. 31, at the ACM Computer and Communications Security conference in Alexandria, Va.
Lee's students study all aspects of building more secure microprocessors and hardware. In June, at the IEEE Symposium on Computer Arithmetic, Lee and Yedidya Hilewitz, a graduate student at Princeton, published a paper which proposes a revolutionary design of a fundamental functional unit of microprocessors that greatly expands a computer's ability to perform "advanced bit manipulation operations," which are very useful for fast cryptography and cryptanalysis, as well as for many other applications.

Lee is also studying computer architecture that prevents leakage of information through covert channels and side channels. At the International Symposium on Computer Architecture in June, Zhenghong Wang, one of Lee's graduate students, presented a paper describing a hardware approach to preventing so-called "software side-channel attacks" during which attackers exploit the cache memories that are shared between computer programs to leak secret cryptographic keys .

In September, at the Cryptographic Hardware and Embedded Systems conference, Lee's researchers, Reouven Elbaz and David Champagne, presented a hardware memory integrity solution to rebuff memory replay attacks, where attackers try to trick a computer into accepting material as still legitimate even though it has already been officially deleted.

Open-Source 3D Printer Lets Users Make Anything

Picture a 3D inkjet printer that deposits droplets of plastic, layer by layer, gradually building up an object of any shape. Fabbers have been around for two decades, but they've always been the pricey playthings of high-tech labs — and could only use a single material. A Fab at Home kit costs around $2400 and allows users to print anything from Hors d'Oeuvres to flashlights."

Software 'Chipper' Speeds Debugging

Computer scientists at UC Davis have developed a technique to speed up program debugging by automatically "chipping" the software into smaller pieces so that bugs can be isolated more easily.
Computer programs consist of thousands, tens or even hundreds of thousands of lines of code. To isolate a bug in the code, programmers often break it into smaller pieces until they can pin down the error in a smaller stretch that is easier to manage. UC Davis graduate student Chad Sterling and Ron Olsson, professor of computer science, set out to automate that process.

"It's really tedious to go through thousands of lines of code," Olsson said.

The "Chipper" tools developed by Sterling and Olsson chip off pieces of software while preserving the program structure.

"The pieces have to work after they are cut down," Olsson said. "You can't just cut in mid-sentence."

In a recent paper in the journal "Software -- Practice and Experience," Olsson and Sterling describe ChipperJ, a version developed for the Java programming language. ChipperJ was able to reduce large programs to 20 to 35 percent of their former size in under an hour.

How to Turn your Mac into a Haunted Computer

How would you like to have someone walk by a Mac that no one is touching… and have it scare the beejeebuz out of them? It’s quite an easy thing to turn your Mac into a seemingly haunted machine, and I’m going to show you how. Thanks to Wirelesspacket for this tip.

You need to have at least one Mac in the house, of course, in order to do this. First you’ll need to prepare the Mac to talk by going into the System Preferences and make your way into Sharing Preferences. This is normally used for screen and file sharing. However, today we’re going to go there to enable SSH functionality and turn on Remote Login.

I can now connect to this Mac from any other machine on my network, be it another Mac, a Windows computer or even a Linux box. I’m going to need to open a Terminal Window (Command Prompt in Windows). There, I just type the command say followed by a space, and then whatever text I want the Mac to say out loud. Think about it. Someone could be working on their machine, and suddenly it could say to them “Fatal Error! Please Restart! Contact your System Administrator!”.

Want to embed this video on your own site, blog, or forum? Use this code or download the video:

Learn UNIX in 10 minutes(V-1.3)


This is something that I had given out to students (CAD user training) in years past.
The purpose was to have on one page the basics commands for getting started using
the UNIX shell (so that they didn't call me asking what to do the first time someone
gave them a tape).

This document is copyrighted but freely redistributable under the terms of the GFDL .

Send me patches, comments, corrections, about whatever you think is wrong or should be
included. I am always happy to hear from you. Please include the word "UNIX" in your subject.


Moving around the file system:
Listing directory contents:
Changing file permissions and attributes
Moving, renaming, and copying files:
Viewing and editing files:
Environment variables
Interactive History
Filename Completion
Bash is the way cool shell.
Command Substitution
Searching for strings in files: The grep command
Searching for files : The find command
Reading and writing tapes, backups, and archives: The tar command
File compression: compress, gzip, and bzip2
Looking for help: The man and apropos commands
Basics of the vi editor

Basic UNIX Command Line (shell) navigation : Last revised May 17 2001


File and directory paths in UNIX use the forward slash "/"
to separate directory names in a path.


/ "root" directory
/usr directory usr (sub-directory of / "root" directory)
/usr/STRIM100 STRIM100 is a subdirectory of /usr

Moving around the file system:

pwd Show the "present working directory", or current directory.
cd Change current directory to your HOME directory.
cd /usr/STRIM100 Change current directory to /usr/STRIM100.
cd INIT Change current directory to INIT which is a sub-directory of the current
cd .. Change current directory to the parent directory of the current directory.
cd $STRMWORK Change current directory to the directory defined by the environment
variable 'STRMWORK'.
cd ~bob Change the current directory to the user bob's home directory (if you have permission).

Listing directory contents:

ls list a directory
ls -l list a directory in long ( detailed ) format

for example:
$ ls -l
drwxr-xr-x 4 cliff user 1024 Jun 18 09:40 WAITRON_EARNINGS
-rw-r--r-- 1 cliff user 767392 Jun 6 14:28 scanlib.tar.gz
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | | | |
| | | | | owner group size date time name
| | | | number of links to file or directory contents
| | | permissions for world
| | permissions for members of group
| permissions for owner of file: r = read, w = write, x = execute -=no permission
type of file: - = normal file, d=directory, l = symbolic link, and others...

ls -a List the current directory including hidden files. Hidden files start
with "."
ls -ld * List all the file and directory names in the current directory using
long format. Without the "d" option, ls would list the contents
of any sub-directory of the current. With the "d" option, ls
just lists them like regular files.

Changing file permissions and attributes

chmod 755 file Changes the permissions of file to be rwx for the owner, and rx for
the group and the world. (7 = rwx = 111 binary. 5 = r-x = 101 binary)
chgrp user file Makes file belong to the group user.
chown cliff file Makes cliff the owner of file.
chown -R cliff dir Makes cliff the owner of dir and everything in its directory tree.

You must be the owner of the file/directory or be root before you can do any of these things.

Moving, renaming, and copying files:

cp file1 file2 copy a file
mv file1 newname move or rename a file
mv file1 ~/AAA/ move file1 into sub-directory AAA in your home directory.
rm file1 [file2 ...] remove or delete a file
rm -r dir1 [dir2...] recursivly remove a directory and its contents BE CAREFUL!
mkdir dir1 [dir2...] create directories
mkdir -p dirpath create the directory dirpath, including all implied directories in the path.
rmdir dir1 [dir2...] remove an empty directory

Viewing and editing files:

cat filename Dump a file to the screen in ascii.
more filename Progressively dump a file to the screen: ENTER = one line down
SPACEBAR = page down q=quit
less filename Like more, but you can use Page-Up too. Not on all systems.
vi filename Edit a file using the vi editor. All UNIX systems will have vi in some form.
emacs filename Edit a file using the emacs editor. Not all systems will have emacs.
head filename Show the first few lines of a file.
head -n filename Show the first n lines of a file.
tail filename Show the last few lines of a file.
tail -n filename Show the last n lines of a file.


The behavior of the command line interface will differ slightly depending
on the shell program that is being used.

Depending on the shell used, some extra behaviors can be quite nifty.

You can find out what shell you are using by the command:

echo $SHELL

Of course you can create a file with a list of shell commands and execute it like
a program to perform a task. This is called a shell script. This is in fact the
primary purpose of most shells, not the interactive command line behavior.

Environment variables

You can teach your shell to remember things for later using environment variables.
For example under the bash shell:

export CASROOT=/usr/local/CAS3.0 Defines the variable CASROOT with the value
export LD_LIBRARY_PATH=$CASROOT/Linux/lib Defines the variable LD_LIBRARY_PATH with
the value of CASROOT with /Linux/lib appended,
or /usr/local/CAS3.0/Linux/lib

By prefixing $ to the variable name, you can evaluate it in any command:

cd $CASROOT Changes your present working directory to the value of CASROOT

echo $CASROOT Prints out the value of CASROOT, or /usr/local/CAS3.0
printenv CASROOT Does the same thing in bash and some other shells.

Interactive History

A feature of bash and tcsh (and sometimes others) you can use
the up-arrow keys to access your previous commands, edit
them, and re-execute them.

Filename Completion

A feature of bash and tcsh (and possibly others) you can use the
TAB key to complete a partially typed filename. For example if you
have a file called constantine-monks-and-willy-wonka.txt in your
directory and want to edit it you can type 'vi const', hit the TAB key,
and the shell will fill in the rest of the name for you (provided the
completion is unique).

Bash is the way cool shell.

Bash will even complete the name of commands and environment variables.
And if there are multiple completions, if you hit TAB twice bash will show
you all the completions. Bash is the default user shell for most Linux systems.


grep string filename > newfile Redirects the output of the above grep
command to a file 'newfile'.
grep string filename >> existfile Appends the output of the grep command
to the end of 'existfile'.

The redirection directives, > and >> can be used on the output of most commands
to direct their output to a file.


The pipe symbol "|" is used to direct the output of one command to the input
of another.

For example:

ls -l | more This commands takes the output of the long format directory list command
"ls -l" and pipes it through the more command (also known as a filter).
In this case a very long list of files can be viewed a page at a time.

du -sc * | sort -n | tail
The command "du -sc" lists the sizes of all files and directories in the
current working directory. That is piped through "sort -n" which orders the
output from smallest to largest size. Finally, that output is piped through "tail"
which displays only the last few (which just happen to be the largest) results.

Command Substitution

You can use the output of one command as an input to another command in another way
called command substitution. Command substitution is invoked when by enclosing the
substituted command in backwards single quotes. For example:

cat `find . -name aaa.txt`

which will cat ( dump to the screen ) all the files named aaa.txt that exist in the current
directory or in any subdirectory tree.

Searching for strings in files: The grep command

grep string filename prints all the lines in a file that contain the string

Searching for files : The find command

find search_path -name filename

find . -name aaa.txt Finds all the files named aaa.txt in the current directory or
any subdirectory tree.
find / -name vimrc Find all the files named 'vimrc' anywhere on the system.
find /usr/local/games -name "*xpilot*"
Find all files whose names contain the string 'xpilot' which
exist within the '/usr/local/games' directory tree.

Reading and writing tapes, backups, and archives: The tar command

The tar command stands for "tape archive". It is the "standard" way to read
and write archives (collections of files and whole directory trees).

Often you will find archives of stuff with names like stuff.tar, or stuff.tar.gz. This
is stuff in a tar archive, and stuff in a tar archive which has been compressed using the
gzip compression program respectivly.

Chances are that if someone gives you a tape written on a UNIX system, it will be in tar format,
and you will use tar (and your tape drive) to read it.

Likewise, if you want to write a tape to give to someone else, you should probably use
tar as well.

Tar examples:

tar xv Extracts (x) files from the default tape drive while listing (v = verbose)
the file names to the screen.
tar tv Lists the files from the default tape device without extracting them.
tar cv file1 file2
Write files 'file1' and 'file2' to the default tape device.
tar cvf archive.tar file1 [file2...]
Create a tar archive as a file "archive.tar" containing file1,
tar xvf archive.tar extract from the archive file
tar cvfz archive.tar.gz dname
Create a gzip compressed tar archive containing everything in the directory
'dname'. This does not work with all versions of tar.
tar xvfz archive.tar.gz
Extract a gzip compressed tar archive. Does not work with all versions of tar.
tar cvfI archive.tar.bz2 dname
Create a bz2 compressed tar archive. Does not work with all versions of tar

File compression: compress, gzip, and bzip2

The standard UNIX compression commands are compress and uncompress. Compressed files have
a suffix .Z added to their name. For example:

compress part.igs Creates a compressed file part.igs.Z

uncompress part.igs Uncompresseis part.igs from the compressed file part.igs.Z.
Note the .Z is not required.

Another common compression utility is gzip (and gunzip). These are the GNU compress and
uncompress utilities. gzip usually gives better compression than standard compress,
but may not be installed on all systems. The suffix for gzipped files is .gz

gzip part.igs Creates a compressed file part.igs.gz
gunzip part.igs Extracts the original file from part.igs.gz

The bzip2 utility has (in general) even better compression than gzip, but at the cost of longer
times to compress and uncompress the files. It is not as common a utility as gzip, but is
becoming more generally available.

bzip2 part.igs Create a compressed Iges file part.igs.bz2
bunzip2 part.igs.bz2 Uncompress the compressed iges file.

Looking for help: The man and apropos
Most of the commands have a manual page which give sometimes useful, often more or less detailed, sometimes cryptic and unfathomable discriptions of their usage. Some say they are called man pages because they are only for real men.


man ls Shows the manual page for the ls command

You can search through the man pages using apropos


apropos build Shows a list of all the man pages whose discriptions contain the word "build"

Do a man apropos for detailed help on apropos.

Basics of the vi editor

Opening a file
vi filename

Creating text
Edit modes: These keys enter editing modes and type in the text
of your document.

i Insert before current cursor position
I Insert at beginning of current line
a Insert (append) after current cursor position
A Append to end of line
r Replace 1 character
R Replace mode
<ESC> Terminate insertion or overwrite mode

Deletion of text

x Delete single character
dd Delete current line and put in buffer
ndd Delete n lines (n is a number) and put them in buffer
J Attaches the next line to the end of the current line (deletes carriage return).


u Undo last command

cut and paste
yy Yank current line into buffer
nyy Yank n lines into buffer
p Put the contents of the buffer after the current line
P Put the contents of the buffer before the current line

cursor positioning
^d Page down
^u Page up
:n Position cursor at line n
:$ Position cursor at end of file
^g Display current line number
h,j,k,l Left,Down,Up, and Right respectivly. Your arrow keys should also work if
if your keyboard mappings are anywhere near sane.

string substitution

:n1,n2:s/string1/string2/[g] Substitute string2 for string1 on lines
n1 to n2. If g is included (meaning global),
all instances of string1 on each line
are substituted. If g is not included,
only the first instance per matching line is

^ matches start of line
. matches any single character
$ matches end of line

These and other "special characters" (like the forward slash) can be "escaped" with \
i.e to match the string "/usr/STRIM100/SOFT" say "\/usr\/STRIM100\/SOFT"


:1,$:s/dog/cat/g Substitute 'cat' for 'dog', every instance
for the entire file - lines 1 to $ (end of file)

:23,25:/frog/bird/ Substitute 'bird' for 'frog' on lines
23 through 25. Only the first instance
on each line is substituted.

Saving and quitting and other "ex" commands

These commands are all prefixed by pressing colon (:) and then entered in the lower
left corner of the window. They are called "ex" commands because they are commands
of the ex text editor - the precursor line editor to the screen editor
vi. You cannot enter an "ex" command when you are in an edit mode (typing text onto the screen)
Press <ESC> to exit from an editing mode.

:w Write the current file.
:w new.file Write the file to the name 'new.file'.
:w! existing.file Overwrite an existing file with the file currently being edited.
:wq Write the file and quit.
:q Quit.
:q! Quit with no changes.

:e filename Open the file 'filename' for editing.

:set number Turns on line numbering
:set nonumber Turns off line numbering


The USENET FAQs should be the first place you look for an answer to specific questions.
You can find most of them at RTFM
The contents of this directory includes vi, bash, and comp.unix.questions FAQs.
Searching USENET archives are very useful too. has a USENET archive (formerly's) .
Advanced Group Search rules.

This document was converted from plain text using Vim and
then hacked. Vim is the best version of the one true text editor: vi.

why Apple should buy Sony?

When a company becomes as big as Apple is today, acquisitions become a way to grow quickly and increase synergy towards major corporate goals. Apple long ago stated its
target of living room convergence with video, computer and music, all interactive with the Mac. AppleTV is the first element of that convergence. Steve Jobs has publicly stated that he admires Sony. Apple and Sony go way back in minor collaborations. My first laptop was a PowerBook 100, an Apple Mac manufactured by Sony.

Sony represents some great building blocks to make the transformation of Apple Computer into Apple, the electronics company. Owning Sony would combine the strengths of two great companies into a conglomerate that might blow the competition away. Sony has recently lost its way and needs focus to regain its former glory. Its value is down enough to make it a takeover target in the right situation. Look at the intersections of interest between the companies.

Sony of course, owns PlayStation, which would give Apple the game franchise it lacks. Apple could use that block in building the electronic living room of the future. How would you like to run PlayStation games on a Mac or in HDTV format on your Sony theater HD video display? How about a Sony HDTV camcorder with a built-in hard drive built in that records video in a format that would allow your Mac to use that video directly in the camera and then burn to a Blu-Ray disk, without ever transferring the video into the computer. Electronic devices are commonly "close but no cigar" to doing the cool things that are so "Apple." Sony needs that extra "cool factor" that they have lost sight of over the years, that instinct to know what customers really want is what Apple has in spades.

Blu-ray is another Sony property that Apple can help Sony build on. Apple is one of the early adopters of the Blu-ray high definition video format and we will see Blu-ray disk drives in Macs very soon. The "Apple falling on the Blu-ray side of the fence" will help stop HD-DVD (Toshiba) and make Blu-ray the standard HD disk format. Apple is far and away the innovation leader in computer technology and Apple controlling Blu-Ray technology would send a powerful message; and don't forget the revenue stream from licensing Blu-ray.

Sony TV sets are some of the best video displays in the market place. Like Apple, Sony tends to be the quality leader in it's products. Apple could help Sony focus its R&D, spell that "Steve Jobs," Mr. focus himself. The world class product design of Apple combined with Sony could create an entirely new design engine that might revolutionize our living rooms in 5 years time. Sony has been losing ground on it's market share of big screen TV sets, perhaps Apple can help them design wise, especially with user interface and connect-ability.

Sony holds a lot of patents (over 25,000 US Patents) that combined with Apple technology would be a powerful collaboration of synergy. Intellectual property alone, makes the collaboration interesting, let alone the market and manufacturing implications. The international aspect of Sony and Apple would wear out Steve's old jet, and allow him to buy a nicer brand new one. (Steve, you deserve it) This combination might help Apple sell Macs and iPods in Japan. Remember the halo effect.

Sony pictures and music is an additional property that Steve might find useful, since he's Disney's largets individual shareholder anyway. With the entire Disney and Sony film library in the iTunes store, you have instant content, to make the lagging Apple TV device succeed. Content, content content! Sony's music portfolios and recording companies in addition to the extensive movie library are very valuable to Apple for exclusive sale though the iTunes store. Why negotiate a deal when you can just own them?

Some Sony products that are lagging could be discontinued such as Sony's lackluster music players in favor of iPods sold through Sony distribution. Keep in mind the Sony distribution channels are well established and have valuable marketing aspects Apple might well use to its advantage. Sony has a repair system in place to help with electronic repairs across the board. Some Sony assets could be sold off to help pay for the purchase.

Apple has a big fat bank account, a virtual mountain of cash and perhaps it is time to spend some of it to control Sony. There are a lot of creative ways to do it and I wonder if the thought has crossed the mind of Mr. Jobs. I am thinking Wall Street would like the idea. And Sony might even favor a merger as well. As a die hard Mac fan I can only hope that as Apple grows, it never ceases to be the "Apple" that us Mac fans know and love!

144,000 Installs of AppSnapp

iPhoneAtlas reports that one click web-based Jailbreak for the iPhone and iPod Touch has seen 144,000 downloads since its release. The programmers estimates that this number represents approximately 100,000 actual devices.

AppSnapp allows iPhone and iPod Touch users to "jailbreak" their device easily to allow installation of 3rd party applications. Using the known TIFF exploit, by simply downloading the image on your device's Safari browser triggers the application to open up the iPhone and install the proper applications.

How ATI's new numbering works

Wednesday, October 31, 2007

THE NEW NAMING scheme for ATI cards is about to see the light of day, and frighteningly enough, this one makes sense. What were those product planners thinking?

Theo told you about the names Monday, but how those names come about is interesting. Take the 3870 for example, or to use the full marketspeak, ATI Radeon HD 3870. The first number, 3, denotes the Generation. Why this is different from the 2x00 line I don't know, but from now on, this should advance generationally, whatever that means.

The second number, in this case x8xx, connotes Family, and the last two digits, xx70 is the Variant. 70 is equivalent to XT, 50 is the new name for Pro, and 13 is the card from that company you never heard of with the Englishish manual and no web site. Don't buy the 3813.

When the next gen variants of the 2400 and 2600 come out, expect to see a 3x50 and 3x70, and likely with a few other variants as well.

Last up, there is a card named ATI Radeon HD 3870 X2 on the slides that we have seen, with a release date of 'winter'. The non-X2 line has a price listed as $150-250, while the X2 is in the same price point as the 2900XT, or about $400. I guess that would make the X2 two higher end 3870s on a PCB, but that is not specified.

I suppose all of these questions and more will be answered on the 15th.

Why Non-Technical Users Might Find Shell Scripting Useful

You know, I've never found any real use for a shell script. Recently, I found an actual reason to write one for moving and converting audio files using a few less keystrokes.

I admit it, I'm really a desktop user who doesn't mind getting under the hood every now and then. I enjoy playing with the 'big' toys, like RDBMSes because I can afford to. But mostly, using GNU/Linux affords me an opportunity to do what I need and want to do for a price that can't be beat. Much as I've tried, the only shell scripts I've written in the past were pretty contrived, or simply following some tutorial. Now I have a shell script I can actually make use of.

I'm not going to try to teach Bash scripting here. There are plenty of places where you can learn that. is one. The Advanced Bash-Scripting Guide is another. But I do want to make the argument that even non-technical people ought to consider taking a little time to learn something about the Bash shell and how to write a simple script.

For those that don't already know, I'm using gNewSense, a GNU/Linux distribution that aims at being completely libre, on my laptop. But at least one site I use offers some content only in RealMedia or MP3 format. Unfortunately, MP3 is hampered by patent issues, and I prefer to avoid that. So I started downloading the MP3 files and converting them to Ogg-Vorbis, and then deleting the MP3 files. But that requires downloading the files, moving them into the folder I want, and then converting and deleting them.

First, let me explain the need to move the files. Most of the time, I put my downloaded files in one folder, and choose a different folder for multimedia files by choosing "Save link as" from the context menu. In this case, the site uses a dialog that makes this approach impossible. So, after I download the file, it's a matter of dragging it to the right place in Konqueror, or typing the appropriate command at a Bash prompt. Then I have to run mp32ogg using Bash. And, of course, I have to delete the MP3 file when I'm finished. Using a shell script simplifies this task.

The whole command-line sequence to accomplish my task involves three commands: 'mv', 'mp32ogg', and 'rm'. Of course, in the text file I created, I added the standard initial comment lines:

# Move MP3 files from /downloads to /media/mp3 and convert to Ogg-Vorbis format

mv downloads/*.mp3 media/mp3

mp32ogg media/mp3/

rm media/mp3/*.mp3

So then I saved the file and made it executable. Now, instead of typing those commands, I just open a Bash prompt and type the one new command I created, like this, after downloading the file:

So, now I download the file, type the new command, and play it Amarok.

This may seem a bit contrived. After all, why not just download the MP3 codec, or use a distribution that supports MP3 out of the box? I've already answered that - there are legal issues that lead me to avoid MP3. The site I use has not responded yet to my request for Ogg-Vorbis files, and avoiding the site is detrimental to my goals, unfortunately.

The other reason this is a good example, rather than a bad one, is that, in the Free/Open Source Software community, there are numerous ways to do any particular task. So, while some newbies or non-technical folks might prefer the path of least resistance, and choose a distro that supports MP3 out of the box, this example demonstrates that you can make up new commands as you go (within reason, of course) to simplify what might seem like an otherwise daunting task.

A more typical task for shell scripting is automating your back-ups or auto-configuring your wifi card at boot-time, depending on your location. Blue GNU readers will surely be able to offer other examples. But I hope that non-technical people will be able to see better why anyone would even bother trying to write a shell script.

Note:As has been pointed out in the comments, this script needs some error checking and could probably be greatly enhanced.

Don't be afraid, Linux isn't just for geeks

Monday, October 29, 2007

It came out earlier this week that Dell will soon offer computers running Linux instead of Windows. Not all of its machines, obviously — the company wants to stay in business — but Linux will be an option on at least two desktops and one laptop models.

It's going to be an interesting experiment. Linux is an incredibly powerful operating system, but it's a tinkerers' OS designed to let you get under the hood. There is also a huge base of developers who are coming up with new features, new software, and better ways to do things.

Older versions of Linux were strictly the province of geeks who wanted to play. But for the past several years there's been a large and growing movement to make it accessible to the non-geek — to make it as user-friendly as Windows, but with the power of the Linux community behind it.

The version of Linux Dell will be offering, Ubuntu (it's pronounced "oo-boon-too"), is one of the most popular, user-friendly, and well-designed versions — or distros —available. It's got all of Linux's power and stability, it's completely free (as is most of the software available for it), it's tweakable, and it's — mostly — easy to use.

But "mostly" is the key.

For me, part of determining whether Linux is ready for primetime is whether it would pass the Minandeli test. That refers to my parents, Min and Eli, who are no longer novice Windows users, but far from experts. Could they use Linux?

That in mind, a few weeks ago I set out to play with the latest versions of some Linux distros. The four at the top of my list were Ubuntu and its sister, Kubuntu, as well as OpenSUSE and PCLinuxOS, all of which were reportedly well designed and easy to use.

Alas, the PCLinuxOS download sites were offline and OpenSUSE didn't like my monitor, so I spent my time with Ubuntu and Kubuntu. (They're based on the same underlying code, but have different desktops, analogous to hatchback and sedan versions of the same car.)

Conveniently, Dell played right into my hands by choosing to offer a Linux distro that I had an opportunity to use.

Smooth operators

Let no one say that Linux — specifically Ubuntu and Kubuntu — isn't a beautiful, mature operating system. It installs quickly and easily.

A Windows or Mac user would feel quickly at home, and would enjoy some of Linux's nicer features, such as my favorite: multiple desktops you can switch among.

And Windows has nothing on Adept, Linux's add and remove programs feature. It doesn't just help you remove unwanted programs. It also gives you access to hundreds of pieces of software — from simple games to powerful office applications — stored in online libraries called repositories. It's like having a huge software store at your fingertips, where everything is free.

And that's where you get the first inkling of Linux's weak spots. There are two facts about Linux that deeply affect the user experience. First, there is a huge and dedicated Linux development community. This is good and bad.

If you thought the amount of software that's preinstalled on a new Windows computer was bad, Ubuntu will knock you over. Sure, it's nice having all those free programs at your disposal (unlike what's on a lot of Windows systems, this stuff isn't trialware). But for someone just getting his feet wet on a new operating system it's what psychology professor Barry Schwartz famously termed " a tyranny of choice."

Want to play music? There are 11 music players to choose from, including Audacious, JuK, and Quark. Need a text editor? Would you prefer GTKedit, Kate, KEdit, KWrite, Leafpad, Mousepad, or xae? All are available with a click or two from the gigantic repository.

If you want to install something that's not in the repositories, though, you might run into another non-Windows-like aspect of Linux. It's much more modular than Windows, so many programs need other software in place in order to work — something called "dependencies."

Thus when I tried to install the Cinelerra video editor, I had to first install some other things, and some of those needed things as well. Had my geek gene not been expressing itself, it would have been impossible.

Linux users are comfortable with this, judging by a comment in an article written earlier this year about Cinelerra: "...installation is simple: I add the correct Cinelerra repository for my CPU, along with the Debian Multimedia repository, to my /etc/apt/sources.list file, then update and install Cinelerra."

Linux folks are some of the best tinkerers on the planet, so this kind of stuff is second nature to them. My parents, not so much.

And while Linux itself — especially the version Dell will offer — is slick, much of the software available for it is not. It lacks the polish of many of the applications you'll find for Windows and the Mac.

The GIMP, the Linux image editor on par with Photoshop, really isn't on par at all. Yes, you can do most of the same things, but if you're coming over from the Adobe product you'll find The GIMP rough around the edges, to say the least.

And if you want to do video editing, forget it. There are a handful of programs available, notably Kino and Cinelerra, but neither works as smoothly as, say, Sony Vegas or even Adobe Premiere.

The best office suite for Linux is, which is very, very good ... but, again, a step below Microsoft Office when it comes to smoothness and polish.

Is Linux a viable desktop option if you're buying a Dell computer? Absolutely, as long as you're not interested in video editing (and you image-editing needs are limited), and as long as you're willing to put up with rough edges in exchange for a free operating system, freedom from just about any virus, and the potential to tinker to your heart's content.