Wednesday, October 31, 2007

Linux vs. Windows: Why Linux will win?

One of the oft-mentioned weaknesses of Linux, fragmentation, just happens to be one of its greatest strengths. A broad range of choices in an immature market is a good thing. Of course, choice does come at a cost. For example, there may be no standard way to do a particular task. Further, development resources will sometimes be split among two or more projects. However, these are weaknesses in the short term only.One could similarly argue that evolution of species suffers from the same ‘weakness’ of fragmentation. However, in the long term, the survival and consolidation of the best traits results in an improved breed. Eventually, one of the many approaches to some desktop task will rise to dominance and show the market the right way to do it, and, at the same time, reduce the fragmentation problem.Based on my observations, business continuity considerations are starting to place more emphasis on portable data formats and protocols. Relational databases, contrasted with the counter examples provided by Microsoft formats, are helping to raise awareness of the value of portable data.

For a private business to blithely entrust their data to proprietary formats and protocols is irresponsible at best. For a public company to do so can be looked upon as a breach of the shareholder’s trust; an unnecessary liability. It’s quietly overlooked now partly because of the ubiquity of the practice and partly because no Microsoft-dependent organization wants to point out a liability from which they also suffer. This situation will change with growing awareness of the problem and as the Linux-plus-free-applications option makes vendor lock-in increasingly harder to justify. The time is coming when the stock market will recognize and reward data independence among public companies.

Linux is entrenched in the server world. That provides a huge opportunity to expand into more and larger server niches. It also provides a small contributing stream of desktop users in influential places.

Major market shifts, when limited by ingrained attitudes, are generational. It takes the replacement of one generation by the next for a market to complete such a transition. Even after Linux comes to dominate in new installations, there will naturally be Windows holdouts for many years, in both homes and organizations. This diehard tenacity is not an unexpected sign of strength, but it will be interpreted as such by a certain class of industry analysts for many years.

The IT industry has an inertia that is almost unimaginable to someone who hasn’t spent significant time immersed in it. Application systems built on one operating system or architecture are extremely expensive to port to an unrelated OS or architecture. While this effect does slow the uptake of Linux in business, it also prevents a sudden loss of the Linux market share. But, mostly, it masks the rise of Linux so that it is possible for much of the IT industry to simply ignore its growth. I think that this effect of the slow and gradual adoption of Linux is the main support for the ‘Windows has won the desktop’ analysts’ arguments.

Linux is free as in ‘free beer’. Yes, you can buy it — and many do — but when you pay money for Linux you are really buying something else: support, non-free components, and convenience, to name a few. The reality, however, is that Linux is as free as you need it to be.

Linux is also open. It can be extended, embedded, and used as needed without restrictive licenses and without fear of vendor lock-in. This characteristic of Linux can only improve Linux’s profile with each business continuity study and proprietary counter example. The significant restrictions of Linux’s license, the GNU General Public License (GPL), establish rules of redistribution, not limitations of use.

Linux is also scalable — but just what does that mean? Scalability runs in several directions. To say an OS is scalable doesn’t simply mean that it scales to very large systems. Rather, scale refers to the entire range from the very small to the very large. It refers not just to the vertical dimension but also to the horizontal, across arrays of clustered systems. On this measure, Linux truly excels. Linux powers an amazing range of systems, from tiny devices to supercomputers. Of the several operating systems that scale to very large systems, Linux seems to be the one destined to own the small end of the size spectrum.

Security may be even more important than scalability to the IT industry. Security concerns are also gaining mind share among home users as identity theft becomes more widespread. SELinux is beginning to be integrated into major Linux distributions — which will expand the number of security-conscious IT shops that can deploy it. At the same time, Windows has spawned a healthy industry dedicated to screening out viruses and worms.

I believe that Microsoft’s practice of neglecting security is one of the biggest reasons for Firefox’s phenomenal success, just as it is steadily contributing to Linux’s growth.

Meanwhile, there are a few features that many Linux distributions are still missing out of the box. As each of those areas is addressed, end-user Linux adoption will increase. As this process adds to the size of the Linux installed base, the newly enlarged base will increase the value of solving other such problems, continuing to fuel the positive feedback loop. As Linux reaches ‘critical mass’, almost all of the other arguments against Linux will fall, one by one. For example, when major vendors start offering preconfigured Linux systems to home desktop users, one of the most persistent complaints against Linux, that ‘it is hard to install’, will become irrelevant. As many readers surely realize, Windows is difficult to install as well. The difference is that users generally don’t have to install Windows. It comes preinstalled, and with a preconfigured ‘restore’ CD. The implication of this is that as Linux approaches critical mass, its period of fastest growth may still lie ahead!

Meanwhile, Microsoft’s desktop network effect advantage is weakening due to cross platform software packages such as Firefox, OpenOffice, and, for programmers, gcc.

Even some game makers could conceivably abandon Windows by releasing custom Linux LiveCD versions of their games. Granted, there might need to be some embedded graphics support, but this need not be an insurmountable problem since many games only support a limited number of graphics adapters anyway.

Linux has a certain ‘coolness factor’ that appeals disproportionately to young people. Further, Linux is strongest among the technological elite, i.e., those who help and advise others, run websites, write code, and generally set technology trends. This slice of the market is more important to the future than their numbers suggest

Microsoft has, as they say in politics, ‘high negatives’. That is, a substantial percentage of people very much dislike Microsoft. These people will go to considerable efforts to avoid buying or using Microsoft products as alternative products become more visible.

Capitalism, like open source, is relentless and efficiency based. A central planner can never fully predict a market’s evolution — yet capitalism moves in lockstep with it. In much the same way, various Linux distributions will be born and die as desktop evolution relentlessly marches on. Even the current ‘Linus’ branch of the kernel can and will be replaced (forked) if it doesn’t follow the main market closely enough. The ‘planned economy’ of Microsoft is at a disadvantage when facing the evolutionary dynamics of the laissez faire open source bazaar.

Compounding the problem for Microsoft, Linux is poised and ready to pounce upon any new, Windows-incompatible, hardware platform; perhaps IBM’s upcoming cell processor will be the next Linux success story. Linux runs on almost everything and gets quickly ported to new hardware. Linux is agile, Microsoft is not.

Microsoft’s biggest remaining asset is probably the vendor lock-in ‘feature’ of Microsoft Office. Of course, that lock-in is also one of the biggest reasons not to use Microsoft Office. As free office suites achieve acceptable levels of command, feature, and file compatibility with MS Office, more and more user’s desktops will become available to Linux. Microsoft will, as always, try to leverage their current lock-in into future lock-in. But with the pace of office software development slowing as the market nears saturation, that is easier said than done. Changing Office to render a competitor incompatible will also hinder older versions of Office, creating more ill will. Also, if a competitor ever does achieve close compatibility with the current version of Office, customers will have the option of jumping to the competitor if Microsoft changes the file formats. With bad timing or a bit of bad luck, such a lock-in maneuver by Microsoft runs the risk of hastening the abandonment of Office.

Microsoft has always shrewdly leveraged their network effect and mind share advantage to maintain themselves and grow. They will continue to use this strength — but they face many hazards. They must correctly identify the real threats early enough to fight and nullify them. Microsoft can win many battles and still lose the war. They simply can’t win all the battles and yet their relentless adversary, Linux, can lose battles indefinitely and still come back to win the war. Unfortunately for Microsoft, ‘Linux’ doesn’t need to make a profit and can’t be put out of business by an upside down balance sheet.

Linux does, however, have one looming vulnerability. Microsoft could possibly kill Linux with some unwitting help from the Linux kernel team or the open source applications development community. Governments, through trademark, copyright, and patent law, wield such power over common business practices that runaway software patents — like those now being issued in the US — could kill off commercial Linux use and support in affected countries. For example, heavy participation in a scenario such as this one could lead to a near-death experience for Linux. This scenario, though, is best classified as a government action. Linux has already penetrated so many niches that the chances of Microsoft rooting it out via market mechanisms seem pretty slim.

And, no, Linux isn’t yet ready for every desktop that Windows occupies. However, it wasn’t long ago that Linux wasn’t ready for many server roles either. The server situation has changed drastically just as the desktop situation is now changing. The desktop will change more slowly since it is not transparent to the user, but similar forces are pushing it inexorably forward. Each year new niches are added to the Linux desktop installed base and other, more established, niches grow. With each such increment of desktop growth, another marginal niche becomes viable. A few more years of this growth and the big market niches will gradually go from inaccessible to marginal to viable to dominated. No, Linux can’t yet replace Windows, but time is on Linux’s side.

Meanwhile, if you’re impatient, you can help to speed things up. Help a friend install Firefox or OpenOffice.org. Give a Windows user a Knoppix CD to play with or install a Desktop Linux distribution on their ‘old’ machine and show them a software repository full of nice, friendly, and free binary applications. If you’re a programmer, find an open source project that interests you and lend a hand.]

source:libernix.com

Monday, October 29, 2007

Secrets of Unix :PART 1

Since many people are asking about some neat command line UNIX tricks, I've decided to compile them together into a webpage as two parts. Actually, these are "secrets" for tsch, which is a popular UNIX shell (most commands will work equally well on csh, its predecessor). Also note that versions of programs differ among UNIX systems, and some of the commands may not work exactly as I have described them on your system.

This isn't a comprehensive introduction to UNIX, but rather a collection of little known features that can enhance one's experience in a multi-user UNIX environment, such as is found on most college campuses. This does not replace the manual pages (type "man commandname" at the UNIX prompt) but serves to make people aware of first the existence, and second the general utility, of some commands.

In this part the commands are grouped into seven basic categories

1.Multi-user Communication
2. E-mail
3.Remote Communication
4.Text Editing
5.Web Browsing
6.Process Management
7.Symbols


1.Multi-user Communication:

finger
finger username gives you specific information about a user, including his real name, home directory, and .plan file, if one exists. If the user is logged on, finger will tell you from where he is logged on and how long he has been idle. If the user is not logged on, finger will return the time, date, and address of his last connection. If you just type finger you'll return a list of all users currently logged on to the system. Sometimes users may set preferences to block being fingered, but finger | grep username will allow you to see if they are logged in nonetheless. A neat trick is to set up a text file named .friends with each of your friends' usernames on a new line, and then type finger | grep -f ~/.friends to see which are of your friends are logged in all at once.

last
last username tells you when (and from what address) a user last logged on and when they logged off. Generally the system will recycle the log after a period of days, such as week. Note carefully that only a system with multiple physical machines (for example fas.harvard.edu actually refers to ten physical machines, is01.harvard.edu.edu to is10.harvard.edu, to better distribute the load) last will provide you with information only from the machine which you are currently logged on to. Finger will tell you what machine they last logged on to.

who/rwho
who shows a list of all users logged onto your machine, and rwho shows a list of all users logged onto machines connected to the same local host. In the case of fas.harvard.edu, for example, who shows a list of all users logged onto the same physical machine, while rwho shows a list of all users on all of the ten Harvard IS machines. Type rwho -a to list users who have been idle for more than an hour. Generally finger is more useful, but rwho counts idle time in a generally more useful way.

w
w username tells you what programs a user who is logged into the same physical machine is currently running. Generally, you'll find more information from ps -u username instead of using w.

.plan

The .plan file is a text file in that you can create in your home directory. If it exists, it can be displayed when a user fingers you. Users often put additional contact information in their .plan files, or what they working on at the moment, or a bit of humor. Be sure that the permissions are set correctly so that other users can read your .plan file.

talk
talk username lets you invite another user to chat interactively with you. The user must be logged in, of course, but also must be on the same physical machine. Thus you may finger a user to determine if they are logged in, but when you use the talk command, it may say that the user is not logged in. Look carefully at their finger information, and use talk username@host, where the host is given by the finger command. Then you can invite them to a chat. Of course, the user must accept your chat invitation. Unlike some instant messaging services, talk is real-time, so your keystrokes are transmitted as they are made. It's often good protocol to "double-space" your chat to make it easier to read, and you can periodically clear the window by holding the key. Quit the chat by + (often written as ^c)

ytalk
ytalk is a variant of the talk program that allows multiple users to participate in a single chat. Invite multiple users by entering ytalk username1(@host1) username2(@host2) etc. You can, of course, omit the host if you are all on the same physical machine.

write
write username(@host) lets you write a message on the following lines and send it as a quick "pop-up" message to a user. Terminate your message with ^c

ph
ph is a very powerful program that lets you look at the phone directory on your system so that you can use one piece of information about a user to find other information. Most often you know the real name of a user, and want to find their e-mail address, physical address, or telephone number. If you know the person's exact name, you just type it in, although you'll get more nicely formatted output if you type query realname at the ph> prompt. Sometimes you may not know his entire name, and so you can use the standard * (many characters) and ? (single character) wildcards to help narrow your search. Sometimes the search can be finicky, so if you're not finding the person you are looking for, be creative, and try possible alternatives (e.g. joe, instead of joseph) or widen your search with more wildcards. If you type fields at the ph> prompt, you can also get a list of indexed fields. To search for someone by their email address for example, type query email=username@host at the ph> prompt. Systems may use slightly different names for fields, and not all fields are indexed. Some implementations of ph require you a enter a query mode, by typing query at the ph> prompt, and some will you to modify your own directory information by logging in, and editing fields.



2.E-mail (using pine):

pine

pine is a very full-featured text-based e-mail program. This section enumerates some useful features that many users may not know about. While some are seduced by the graphical interface of POP/IMAP clients such as Eudora (or, yes, even Outlook) pine holds a number of advantages, especially on a college campus. If you check your e-mail from multiple computers, running pine ensures that you have all of your e-mail available from any location. Furthermore, unless you download and run a suspicious file, using pine renders you impervious to e-mail viruses. Pine is a powerful program, and generally quite easy to use. You start it from the shell prompt with the command pine, although some prefer to begin pine with immediately opened to their inbox, which can be accomplished by typing pine -i

nfrm

nfrm is a sometimes finicky command that tells you whether you have any new mail, and if so it will print the sender and subject. This can let you check to see whether you really want to read your new mail right away without actually opening pine. You might find that the command nfrm -s unread is more reliable.

rich headers

When composing a message, if your cursor is in the header area (the To, Cc, Attachment, Subject area) pressing ^r (remember, +) Will activate the rich header. The most important addition is the Bcc, or blind carbon copy field. Entering addresses in this field will all you to send mail to these addresses without them knowing that the other addresses in this field have also received the message. They will still see the To and Cc fields, however. As a courtesy, the Bcc field should be used when you are sending to a large list-not for secrecy, but because no one wants to read tens or hundreds of e-mail addresses. With the rich header, you can also control which folder the message will be copied to when it is sent (Fcc) among other things.

address book

Having an address book can be a useful feature in pine. You can make both individual entries so that you don't have to remember complicated usernames, as well as making lists of users (e.g. chemistry study group, office-mates, etc.) so that you can easily send to a group. Make changes to the address book from the main menu of pine (press from the inbox) and you can enter names from the address book either by typing the name or nickname directly into the To, Cc, or Bcc fields, or type ^t to choose from a menu.

attaching files

It is often very useful to attach files to e-mail messages. You can easily attach any file in your home directory (or a subdirectory) by either typing in the exact name of the file (case-sensitive) into the Attachment field, or type ^t (when the cursor is in the field) to choose from a menu. You can attach multiple files, and you can easily delete a file you mistakenly attached by moving the cursor to the attachment line and type ^k. Another very useful, but little known feature, is the ability to insert a text file directly into the body of a message. When the cursor is in the body of the message type ^r and then enter the file name or type ^t to choose from a menu. This is really useful, because you can store frequently used bits of text in files in your home directory and insert them very quickly.

editing features

The pine editor (pico) is fairly powerful, and has a number of time saving features. You can delete an entire line by typing ^k, and you can delete multiple lines by holding down this keystroke (be careful!) Actually, the text isn't really deleted, but stored in a temporary buffer, and you can "paste" it back into the message by typing ^u. You are free to move the cursor around, and continue to type in between "cutting" and "pasting" but be careful not to remove more text with ^k before using ^u if you want to save what you previous removed. Sometimes the text is a paragraph will break in an odd way after you've had to make changes, to typing ^j when the cursor is in a paragraph will rearrange the text so that it is nicely justified. Just be careful, for this command can also destroy careful formatting of lists, computer code, or any other text that isn't standard prose. ^a will move the cursor to the beginning of the current line, while ^e will move it to the end of the current line. ^y and ^v will page up and page down respectively. You can also use ^l to redraw the screen (useful when pine interrupts your composition with a new message arrival or chat request). And while everyone knows you can attach files to a message with pine, you can also insert a text file in the body of a message with ^r, which makes a useful way to compose many messages with the same text is part of a message (i.e. save the body of the message to a text file and write a personal greeting to each recipient in the body and then insert the text file.

spell checking

Most versions of pine also include a spelling checker, which can be accessed with the ^t command when the cursor is in the body of the message. The default spelling checker, spell, will identify misspelled words, but you will have to provide a replacement, or ignore the word. Often, correcting a misspelling can change the flow of the text in a paragraph, and so the ^j command is useful to reformat the text. If your system includes the ispell program, you can setup pine to use this spelling checker by default, which allows you to have a customized dictionary of words, and will suggest spelling replacements. To enable ispell is quite simple: go to the main menu of pine by pressing (m) then (s) for setup and © for config, then press to search, type "speller" and enter "ispell" into the field.

postponing

Conveniently, pine allows you to postpone messages as you are composing them, to return to them later. Press ^o when composing a message to postpone it. When you try to compose a message again (by pressing c from the inbox or main menu) you will be prompted to either resume a postponed message or start a new message. You can postpone many messages. Sometimes your composition can be interrupted, such as by a network or computer problem. Pine is almost always able to automatically save the incomplete message, and if any such messages exist, you will be asked to resume them in the same manner when you next compose a message. Not resuming a message does not delete it, but just postpones it again.

flags

When a message first arrives it will have a New (N) flag. When you open the message the N flag will disappear. When you reply to a message it will have an Answered (A) flag. When you delete a message it will have a Deleted (D) flag, until you actually exist from the folder, when such messages will be deleted. You can manually change the flag of a message by pressing <*> in the message list, and then following the instructions at the bottom of the screen. Sometimes it's useful to keep the New flag on an important message that you want to remind yourself to reply to. You can also quickly remove a deleted flag by pressing (u) while the message is selected. Incidentally, if you've ever wondered what those plus signs are doing next to some messages at the far left, that means that the message was directed directly to you, as opposed to being sent to you as a carbon copy.

saving attachments

When you receive a message with attachments, you can press v to view the attachments, and then s to save the attachments to your home directory. You can then work with them on Unix, or download them via ftp onto another computer. Sometimes you want to save a message, but not its attachments, because they are so large that they take up your disk quota. To delete the attachments first press v to view the attachments, and then select one, press d to add a deleted flag to it, then press < to return to the main message view, finally press s to save the message, without the deleted attachments, in any of your mail folders. This is also useful for messages copied to your sent-mail folder that have large attachments.

folders

It is often helpful to set up different folders to organize your mail. From the main menu you can view the folder list, and easily add or delete folders. It's often a good idea to periodically move old messages from your inbox into a saved mail folder, so that your inbox doesn't become too large (if its too large, it's prone to corruption, and pine will run very slowly). Thousands of messages is probably too large.

selecting

From a folder view the select command, accessed by pressing <;> can be very helpful. You can select all messages in a folder received before a certain date, for example, and then apply various commands to them by pressing a. For example, you can delete them all at once, save them to a saved-messages folder, or perform other tasks.

searching

If you're looking for messages sent by a certain person or about a certain subject, you can use WhereIs command to search in the folder view by pressing , and then entering a string to search for and then . You can repeatedly search by pressing and as pine will automatically continue your last saved search.

sorting

Sometimes it's easier to resort your messages rather than searching for a particular name. This can be easily accomplished with the <$> key, followed by a choice from the list at the bottom of the screen. The default sort is by date, and this is preferable in general, but it can be useful to temporarily sort by the sender or subject, for instance. If you're close to your disk quota it's helpful to sort by size so that you can either delete the largest messages, or just delete the attachments! Don't forget to revert to sorting by date when you're finished.

signature

Many people like to put a signature at the bottom of each of their e-mails. You can get pine to automatically add whatever text you choose to the bottom of your e-mails by going to the main menu, press (s) for setup, and then (s) for signature. You edit your signature just like composing a mail message, and save the changes.

preferences

There's more, however, to the setup options than just setting a signature. Many of these options are somewhat obscure, but there are a few that may be particularly useful. The first field you'll see is your own name, which is what people receiving your message see. It's good to actually have your full name, and properly capitalized to look professional. If you're sending out messages on behalf of a group, you might want to temporarily change your name (your e-mail address will stay the same, of course), but remember to change it back! You can also set an alternative program to function as your spelling checker, which is a good idea if your system includes the ispell program. Some people like their messages to automatically move to new folder when read, and so you can setup a Read-Message-Folder. Some people find it annoying that pine asks whether you really mean to quit, so you can toggle the quit-without-confirm option. You can also set the ^k command to cut from the cursor position to the end of the line, rather than an entire line with the compose-cut-from-cursor option.

spawning lynx

If you'd like to be able click on url links in html mail that you receive, pine can be set up to automatically spawn a web browser of your choice (generally lynx, unless you're using X-Windows). From the pine main menu go to the setup and config sub-menu (as above). Use a whereis query to find "url" and check "enable-msg-view-urls" and "enable-msg-view-web-hostnames" At the very bottom of the list you can specificy a url-viewer-application, which should be the full path of lynx (type which lynx at the shell prompt to find the full path). After saving the changes, you should be all set, although ocaisonally this feature fails to work on systems that setgid pine. You can get around this problem by runing pine in a different enviornment along the lines of alias pine 'env SHELL=/bin/sh pine'



3.Remote Communication:

telnet
telnet is a basic program that allows you to connect to remote machines that accept telnet protocol logins. Because telnet does not encrypt passwords, many sites do not accept telnet logins since they are afraid of password sniffers that allow malicious use of accounts. This is actually a very small problem for individual users, and shouldn't worry you when you login to a site via telnet, but explains why some administrators disallow telnet access, in favor of secure protocols, such as ssh. Of course, when you telnet to a site, such as library catalog, which doesn't require a password, there is absolutely no danger! To connect to a particular host type telnet hostname. Ordinarily you end a telnet session by gracefully exiting from the remote machine, although you can always type ^] to enter the interrupt mode, from which you can quit a session.

ssh
ssh is essentially the high-security cousin of telnet. Where possible, you might as well use ssh to connect to a remote machine. The syntax is ordinarily ssh hostname, but the default is to assume that your current username is to be used as the username for the remove machine to which you are trying to connect. Since this is not always the case you can type ssh username@hostname instead to connect to a remote host with a different username. The first time you try to connect to a remote machine with ssh you'll received a "Host key not found from database" message, and a prompt to continue connecting, which you can respond to appropriately.

ftp
telnet is a basic program that allows you to connect to remote machines that accept file transfer protocol logins, and then transfer files and/or directories back and forth. Like telnet ftp does not encrypt passwords, and so many sites no longer allow ftp logins. The basic syntax is ftp hostname and you are then prompted for a username and password. Anonymous ftp sites, such as public domain software repositories allow any user to connection with the username anonymous and any password (sometimes your e-mail address). Other ftp hosts require a username and password to be prearranged-if you have telnet access to the host the username and password are almost certainly the same. You can list the contents of the remote directory with the ls command, and download files from the remote directory to your local working directory with the get command for a single file, or the mget command for multiple files that match a pattern. Likewise, you can upload a file from your local directory of the ftp site with the put command, or the mput command for multiple files. If you want to upload or download a file with a space in its filename, enclose the filename in quotes. You can change the local directory with the lcd command, and the remote directory with the cd command, and type quit to exit.



sftp
sftp is bears the same relation to ftp as ssh bears to telnet. When possible, or required, use sftp to transfer files between hosts. You can logon to remote machine with the syntax sftp (user@)hostname and will be prompted for a password. Other commands are identical with ftp.

scp
scp is the poor man's sftp, and can be used to copy a specific file between hosts. It can be more difficult to use than the interactive sftp, although for certain automated tasks, scp is more suitable.



4.Text Editing:

pico
pico is a general purpose editor that is very easy to use. If you've ever used pine to compose e-mail, then you've actually been using pico. It's also helpful to look at this nice list of the keyboard shortcuts for pico.

emacs
gnu emacs is an editor of immense power and complication-other than the fact that they both can be used to create and edit text files, emacs is everything that pico is not. An introduction to emacs won't even be attempted here, save for two points: ^h t will start the excellent emacs tutorial, and ^x^c will quit the program. If you're using an x-terminal, you may want to try launching xemacs, although even ordinary emacs will have some graphical elements when opened on an x-terminal. You can also install emacs or xemacs on your windows machine.

vi/vim
vi is another common Unix text editor, and vim is often found in Linux. It is also a powerful editor, with two-modes, an editing mode and a command mode. It is also quite complex, but emacs is a much better editor! Alas, if you insist upon using it, a short list of commands should get your started.

ps2pdf/pdf2ps
Since many people do not own the full version of Adobe Acrobat, software that allows you to creative PDF (portable document format) files that are readable (and look the same) on any machine with Acrobat Reader (almost every computer!), being able to create PDF files nonetheless is very helpful. Proprietary formats, such as Microsoft Word are unacceptable for transfer to other people (and platforms) as they may not have the required software, the same fonts, and the document may not appear the same anyway. By printing your document from any application to a file using a PostScript printer driver you can make a PostScript (.ps) file that can be converted to a pdf file with the syntax ps2pdf orig.ps new.pdf The reverse process can be accomplished with the pdf2ps command, which can be useful if you want to send a pdf file directly to a PostScript printer without viewing it first.

enscript/ps2ascii
The enscript command lets you create a postscript file directly from ascii text, which can be useful if you want to send the text to a PostScript printer. The ps2acsii command distills acsii text out of PostScript file, which can be useful for quick searching or viewing.

acroread
When using the X-Windows graphical interface, the acroread command will invoke the graphical viewer for PDF files.

gs
gs stands for ghostscript, which is an extremely powerful and versitile program for working with PostScript and PDF files. It can be invoked graphically under X-Windows, or specific operations can be performed on files with the command line.

more

more filename allows you to quickly view the content of a file in plaintext one page at a time. It is often useful to pipe the output of a command to more; for example ls | more will list the contents of the current directory one page at the time.

cat

cat filename writes the output of a file in plaintext all at once. Often, more is preferred because it will pause the output when it reaches the end of the screen, but there are also many times when you want to view a file all at once, perhaps because you want to use a terminal program to scroll up later, for example

less
less filename allows you to quickly view the content of a file in plaintext one page at a time. It is similar to more, but incorporates a plethora of additional features, particularly being able to scroll backwards as well as forward in a file. It is most useful as a quick way to look through a very large file, since the entire file doesn't have to be loaded, but generally if you're going to spend the time to use less, you might as well load an editor!

head

head filename allows you to quickly view the first ten lines of a file. You can view any number of lines by head -numberoflines filename, so head -14 foo.txt will show the first fourteen lines of the file foo.txt

tail

tail filename allows you to quickly view the last ten lines of a file. You can view any number of lines by tail -numberoflines filename, so tail -14 foo.txt will show the last fourteen lines of the file foo.txt While this is exactly analogous to head, tail does incorporate an additional very useful feature; tail can also be used to display rest of the file after a certain number of lines. Often files contain headers that it is cumbersome to display, and so tail +14 foo.txt displays foo.txt from the fourteenth line until the end of the file.

wc
wc filename will count the number lines, words, and bytes in a file. wc -w filename will count just the number of words, which can be useful when editing long documents.

banner
banner is a quick little utility that creates so-called "banner text" which is a form of ASCII art. Basically, it's a way to make realy big text display on a text-only terminal. Sometimes people want to use it in e-mails or a talk-session (works better with ytalk!) but often it's most used for leaving a message on your screen along the lines of "Don't touch this window!" banner text will create some banner text, and banner a few words will create banner text of "a few words" on separate lines, while banner "a few words" will create banner text of "a few words" all on one line. Be careful about trying to force too much onto a single line-if you exceed the width of the terminal, banner will start wrapping the text around, which becomes unreadable. You can mix and match-strings bounded by quotes will be written on the same line, and any strings separated by spaces will be printed on seperate lines. If you want to use some unsual symbols, you might have to preceed them by a backslash, for example banner !! will try to make a banner out of the last command entered, but banner \!\! will make a banner out of two exclaimation points!

spell/ispell

spell filename will identify possibly misspelled words in a file. If you're system includes the ispell program use it instead, as will allow you to interactively make changes to the file, in addition to suggesting replacements, and allowing a custom dictionary.



5.Web Browsing:

lynx

lynx is a very powerful text-only browser that can be run from the command line terminal. You can go directly to a site by invoking lynx address, or by pressing when already in lynx to go to a new address. You can page through text with , access the history list with , and scroll up and down through links with and and move back and forth through hyperlinks with the and lynx supports many features, such as forms and frames, but does not support javascript, https (secure pages), or, of course, images. Lynx is extremely fast, and can be useful to download files that might otherwise automatically spawn an external viewer on other browsers (for example RealAudio (.ra) will generally spawn the RealPlayer viewer on standard browsers, but can be easily downloaded, without modifying your normal browsing preferences, with lynx). Remember that when you connect to a site with lynx the remote site sees the ip address of the machine that you are logged on to, so if you need to access resources restricted to a certain set of ip addresses (such as certain library resources) this can be useful.

netscape
From the X-Windows interface, you can run the netscape browser to browse the web with images. If you want to be able to use the shell window from which you run netscape, type netscape& to run it in the background.



6. Process Management:

ps
ps shows you a listing of all processes active, including the process identification number (PID). Sometimes it's useful to use the type ps -u yourusername to see all of the processes you have open, especially if you were disconnected from a previous session but left processes hanging.

kill
kill PID# allows you terminate a stalled process from the shell. If there is no ambiguity, you can also kill a process by typing kill %programname, so if I only had one instance of the man process running, I could kill it by typing kill %man without having to use the ps commmand to find its PID#.

jobs
jobs gives you a listing of all the suspended and active jobs running

^z
In many programs ^z allows you to suspend a job as it is being run, to return to later.

fg
fg allows you resume a job that has been suspended (put it back in the foreground).

bg
bg allows you to run a job in the background, so that the shell can be used for other tasks as the job is being processed.



7.Symbols:

&
Placing the symbol & after a command runs the job in the background, so that the shell can be used for other tasks as the job is being processed.

\
The backslash character removes an special meaning from the character that follows it. For example, more test test.txt would produce an error, but more test\ test.txt would display the contents of the file "test test.txt"

|
The vertical bar character represents the very important pipe command. This command allows you to redirect the output of one command immediately to another. For example, to display a directory listing one page at a time the command ls | more can be used. Pipe has a myriad of uses, and is often used fruitfully to pipe output from commands that produce output in some way to commands that filter or process output.

>
The > command can redirect the output of a command to a file rather than to the screen. For example, to redirect a directory listing to the file dir.txt type ls > dir.txt

>>

The >> command allows you to redirect the output of a command to be appended onto a preexisting file. If you also wanted to store the listing of another directory in the same file above, you could type ls subdirectory/ >> dir.txt
;

The semicolon symbol can be used to separate commands entered on the same time. For example, if you wanted to write the time and date to a file, and then append to it the listing of directory contents, the following command could be written on a single line date > dir.txt ; ls >> dir.txt, where the spaces are added for clarity alone.
^

The carat symbol can be used to repeat the previous command while changing part of it. For example, if you first type more test.txt to view the contents of the file "test.txt" and then want to open it with the pico editor, rather than retype the entire line you can simply type ^more^pico and the shell will print the command pico test.txt to the screen and then execute the command. This can be a real time saver.

~
The tidle symbol represents your home directory, and so allows you to quickly access your home directory no matter what directory you happen to be in, just as the forward slash character allows you to easily access the root directory.

!
The exclaimation point can be used to recall previously entered commands. For example !! will recall the last command entered, !-3 will recall the third to last command, !more will recall the last command that began with the string "more" By using the colon along with the exclaimation point you can recall individual words from previous commands. This can be quite powerful, as you can string commands together to create new commands, so !-10:4 | !:2 !-3:$ | !-5:0 executes the fifth word of the tenth to last command and pipes it to the third word in the last command operating on the last word in the third to last command piped to the first word (the command itself!) in the fifth to last command. Whew.

..
Two periods represents one directory level up from your current location, so if you are in /users/username are type cd .. you will be in /users

^c
The + combination is a common interrupt for many processes in Unix.


Important:due to some html tag problems replace() with<> in certain commands.

The rest of this entry will publish in part 2 and that depends on the popularity of the part1.

Sunday, October 28, 2007

Hardy Heron open for uploads

The doors are now open for uploads to Hardy Heron, the next in the Ubuntu line of releases, due for release in the first half of 2008. The LINUX COMMUNITY is ready and waiting for your contributions to what is certain to be our best release yet!

In particular, help is needed to merge the many new versions of Debian packages waiting at . As the graph at [1] shows,the number of packages in need of a merge has been climbing steadily over the past couple of months while Gutsy was frozen, so it's time to work on bringing this number back down again for Hardy.

Naturally this means that Hardy will be a bit bumpy for a while as the many new changes take time to settle. In the event of a cabin depressurization, please remember to secure your own mask first before assisting other passengers. Otherwise, enjoy the ride towards Ubuntu 8.04 LTS, and thanks for flying with the Hardy Heron!

[1] http://merges.ubuntu.com/main-trend.png

Saturday, October 20, 2007

Why linux is successful and not microsoft?

The success of Linux over the past 16 years boils down to a few key factors, according to a panel of Linux luminaries.

Larry Augustin, chairman of VA Software, Eric Raymond, founder of the Open Source Institute, Jon maddog Hall of Linux International, Chris DiBona of Google, and Dirk Hohndel of Intel regaled the capacity crowd with tales of their first experiences with Linux and Linus.

They also made some strong statements as to why Linux has succeeded where BSD failed, as well as noted the conditions required for Linux to succeed in the years to come.

Dirk Hohndel noted that timing was key and that Linux started off as a purely European phenomenon.

For Hohndel three key factors that fostered the rise of Linux: 386 chips, which provided enough power; rise of the Internet, which permitted the collaboration necessary to build Linux; and the GNU toolchain, without which none of Linux would have happened.

Hohndel also noted that Linus Torvalds is also obviously of critical importance.

"Linus is able to take people who vehemently disagree on architecture and get them to agree," Hohndel said.

It is that ability to agree that made Linux different from the BSD community.

Larry Augustin noted that in the early days, BSD was clearly more functional than Linux, but by many measures has not exceeded it.

Eric Raymond said the cause for BSD's failure could be summed up in one word: "overcontrol."

Hohndel responded by throwing out one word of his own: "fragmentation."

"Overcontrol leads to fragmentation," Raymond retorted. "Linux's strength is that it is more loosely coupled."

Maddog Hall said he thinks the success of Linux had a lot to do with the marketing of Linus Torvalds

"Here's this nice young man wearing sandals and with a funny accent, as opposed to other people that weren't quite as nice."

Over the last 15 years there have been a number of "tipping points" for Linux.

Hohndel recounted that one such tipping point occurred in July 1998 when Oracle said it was going to port to Linux.

"It was on the day of the naming of Linus' daughter, our god-child," Hohndel said looking at Maddog.

Hohndel also cited the IPO of Red Hat as a critical tipping point.

The fact that a company could credibly tell people they could make money from Linux was a big deal.

Raymond noted that a big turning point for him was the open sourcing of Mozilla by AOL, an event that ultimately led to the creation of the open source label and the OSI, which he founded.

DiBona cited the availability of decent installers for Linux, as well as the rise of the Internet as tipping points.

He also noted the deficiencies of other competitive platforms to Linux.

"If Mac and Windows didn't suck, people would've used them," DiBona said.

The panel also tackled the issue of where Linux will be in the next five years and what needs to be done to get there.

Hohndel predicted that the embedded market will be 80 percent Linux in the next five years.

For the desktop, market share in mature markets will be single digits in five years; in emerging markets it will be in the 15 percent to 20 percent range.

"Adoption of the Linux desktop is more likely in emerging markets where there is no legacy," Hohndel said.

Raymond got riled up as he proclaimed what he thought was necessary to be done for desktop Linux to be successful.

"We need to do whatever compromise is necessary to get full multimedia capability on Linux so non-technical users don't dismiss us out of hand," Raymond shouted.

A somewhat more relaxed DiBona advised the audience to tell people to use Mozilla Firefox on their desktops.

"Develop for the Web," DiBona said. "People can switch to Web applications from their desktop more easily."