Tag Archives: Linux

Photo Shop on Windows vs. Ice Cream (ice cream wins)

So, Amanda had some 400 photographs that needed to be viewed, selected from (maybe a several dozen selected), then each chosen photo converted to jpeg format, resized to 100o pixels wide and saved.

She began the process on her Windoze laptop. The first photograph took about a minute or two. Realizing that the conversion of the photo had to happen before she could decide whether to use that image or not, I quickly calculated that she had about an hour of work in front of her.

The photos happen to be on a flash card. So, I intervened.

“Let me have those photos for a minute.”

“What are you going to do with them?”

“Watch ….”

Flash card plugged into Linux server.

Photos copied into folder inside a Samba share linked to Amanda’s laptop

Bash shell window open.

Tappity tap tap tappity tap… a simple one liner … Enter.

“This is going to take about 20 minutes. Let’s go get ice cream.”

“Ice cream!!!”

So we went and got ice cream and came back and the images were all converted and resized. Now it would only be a matter of deleting the photos she did not want.

So, I’m eating my ice cream and Amanda says, “Well, that was easy. Can we do this to this other group of 600 photos?”

No problem. We have lots of ice cream.

Any guesses as to what the one liner looked like?

Boot Time (Windows vs. Linux)

Linux in Exile has refined the empirical test of which operating system boots more often. Details and discussion here.

Of course, it also matters that Windows requires constant rebooting for the purpose of routine maintanance, while Linux does not, so the total ‘boot wait’ time (TBWT) for the two systems is so different that they really can’t be compared at all.

Meanwhile, …the new Linux Kernel (2.6.10) has faster boot time and will run faster than the previous Kernel.

Thanks to the already implemented fastboot patches, the new Kernel 2.6.30 has the ability to recognize hard disks simultaneously and therefore significantly quicker. Ext 4 operates more securely, and Ext 3 increases performance.

Kernel 2.6.30 has arrived, and along with Tux as the old new mascot, is accompanied by an assortment of modifications to the new data system Ext 4.

Those of you who have been following the ext4 maneno will want to read the whole story here at Linux Magazine.

Classic Shell Scripting

A repost, continuing along the lines of bashing the shell.

Having examined Learning the bash Shell (In a Nutshell (O’Reilly)) (see here, here, and here), it is now time to turn to a more advanced reference to help you geek out on your Linux computer. If you want to have only one book on bash, get Classic Shell Scripting by Robbins and Beebe. This book has an excellent mixture of history, philosophy, rigorously described details and creative solutions.

For instance, after giving a brief history of Unix (required in all such books) the authors layout the basic principles of what is considered good Unix programming. It is so good I’d like to summarize parts of it for you.

Continue reading Classic Shell Scripting

Google Chromium browser for Linux is now Alpha

… and Ars has a look at it.

The latest alpha build of Chromium provides basic browsing functionality and a few of Chrome’s other features. I was able to load pages, open new tabs and windows, use the browser’s full-page zoom, download files, view and manage history, and run the Incognito privacy mode.

The rest of the features were only partially implemented. It is possible to reorder tabs in each window, but you can’t snap out a tab yet or move tabs between windows. Bookmarking basically works, but with several limitations. Clicking on the bookmark star icon doesn’t pop out the bookmark editing bubble. The bookmark manager is also not implemented yet. Users can, however, toggle the visibility of the bookmark bar and edit its contents.

Remember: With baboons, Alpha is good. With software, Alpha is not. This sounds better than the hacked up version I last tried, but it is not there yet. But perhaps it is just arond the corner.

ars technica review is here

The Asus/Windows Maneno: Was it a hoax?

The dust-up regarding Asus corp and Windows, recently discussed here, is definitely a (well-enough executed) hoax, acording to JH at Linux in Exile:

I got burned this week; I actually believed the hoax that ASUS and Microsoft teamed up, and that an Asus.co.uk page was linking to a It’s Better With Windows site.

But looking at it again, I’m convinced it’s a hoax. And you should be, too. Here are a few obvious telltales:

See JH’s full explanation here.

Learning the bash shell, continued

This is a repost of a review that is timely, given this week’s focus on setting up your Linux server and changing all your computers over to Linux and so on.

i-30a1e0366512a8ac50ae2cf969f02d73-learning_bash_shell.jpgI started this discussion a while back, and now it is time to continue it.

The Bourne Again Shell, bash, is the default command-line shell in Ubuntu and many *nix (Unix, Linux, etc.) systems. You can think of the shell as the most direct way to get into your operating system, and you can think of shell scripts (‘programs’ in essence) as macros that can automate computerized tasks.
Continue reading Learning the bash shell, continued

Diversified Linux Resources

Following on this earlier post, here are links to on line resources that would aid in building, configuring, and using a Linux based computer.

Hardware:


Systems and related information:

Shell Scripting:

Advanced concepts:

Asus PC Eee PC paid off by Microsoft to Screw Linux …

… or so it would seem…. UPDATE: Or, this could be a fake. See comments.

The Asus PC Eee PC was designed specifically to run LInux. The idea is in part to make a very inexpensive globally (more or less) accessable open source system so all the poor children around the world who happen to have a hundred bucks could have a PC just like you do.

Now, Microsoft and Asus have teamed up to produce an ad campaing providing what amounts to a series of lies about the hardware/software combo, claiming that “Windows is Better” on this PC (better than Linux, that is).

Is it Ethical? No doubt. What passes for ethics in our society is often absurd. Is it Really Ethical, like if there were a god would you go to hell for this? No, of course it is not Really Ethical. You would definitely go to hell.

You can go here to read about it, and there you will find the dumb-ass movie they made, and links to the original butt-ugly site they produced.

Learning the Bash Shell

This is a repost of a review that is timely, given this week’s focus on setting up your Linux server and changing all your computers over to Linux and so on.

i-30a1e0366512a8ac50ae2cf969f02d73-learning_bash_shell.jpgFor the most part, computer operating systems all have a “shell.” When people talk about the “command line” … they are talking about the prompt in a shell. The concept of a shell, and the way we think of a shell today mostly stems from its implementation on Unix systems. A shell is a computer program that has a human interface and a number of built in or accessible functions (mostly other programs) that humans can invoke to make the computer do something. On ‘servers’ and on most computers back in the old days, the shell would typically appear as a prompt on a computer screen, and that would be all you would get. You type stuff in, and the computer types stuff as well, and between the two of you, stuff happens. On a computer with a graphical user interface (GUI), there is still a shell, but it looks different. The shell is less tangible to the human user, but the GUI itself is a program that provides the user interface, and it may either be the shell itself or it may be invoked automatically as the computer starts up by the shell.

Continue reading Learning the Bash Shell

Ubuntu Server: Why you want one and how to do it.

Why would you want to install Ubuntu as a “server” rather than as a desktop? The simple answer is: If you need to ask, you don’t want to do it. But, there is a more nuanced answer as well: By installing a server, you get to a) have loads of fun installing a server; b) learn things about the system you never thought were even there to learn; c) have your own server, so serve stuff in your very own home, so when The Internet goes down you can continue to pretend like there’s an internet. Just a much, much smaller and less interesting one.

And, if you happen to have anything to serve up in your own home, or if you want to serve a web site of your own, the server setup will make more sense than the desktop setup.

In truth, you can take a desktop installation and convert it over to a server by just installing and setting up some stuff. I myself am not convinced that this option is not even easier than the server-from scratch option. However, server from scratch (as opposed to tweaking a desktop install) will probably be cleaner and meaner, but most importantly, you will understand what you have in front of you better if you do it from scratch.

There are several resources you can use to help make this work. I recently read and very much enjoyed the book Beginning Ubuntu LTS Server Administration: From Novice to Professional (Expert’s Voice in Linux). (That’s a link to Amazon. If you go there and click around you’ll see a number of similar titles. None of the gay or lesbian server editions will be visible to you, of course.)

Here is a web site
that goes through the process on line. Which of these methods of learning (book vs. on line vs. trial and error) is of course a matter of personal preference.

Let’s go back for a moment as to why you might want a server. Your server may be a low-power draw machine with lower-end graphics that you use to access data (multi-media, files, etc.) and/or devices (printers, scanner, etc.) and in turn access via a wireless network elsewhere in your home.

So, physically, a server is different from another computer because it is not a laptop, it stays on, it is el-cheapo in the graphics department, and it has storage for stuff to serve up (all of these are breakable rules, of course).

In terms of software, there are big differences between a desktop and a server. The server has … servers. Like a web server (apache, for instance) and FTP server, and so on. That software can certainly run on your desktop, but the process of setting up a Linux server, such as the typical configuration known as a LAMP server (Linux, Apachae, MySQL databse, PHP), involves instaling, configuring, and turning on all these bits.

Another thing about a server, typically, is that it sits there without you interacting directly with it most of the time. Typically, you are not using your server for other things like day to day text processing, emailing, web surfing, etc. Again, these are all breakable rules. But a server normally is not your main interactive computer. One thing this means is that you can approach your server with a different personal affect than your regular computer. Your server can be a dangerous place, but because it is your server and not your day to day use computer, you can manage this.

Ubuntu by default does not allow a “super user” mode. A server usually does. So, you can sit down at your sever and check your email and stuff, but you can also sit down at your server and make modifications that only a super user should be allowed to do. Using the Ubuntu solution of “sudo this” and “sudo that” is not convenient, and can actually make some things hard to do, and some scripts that are designed to be run by super user will not operate with the sudo-only environment.

So, you want your server to have super user capacities that you can access, and when you sit down at your server you want to act in a responsible manner worthy of any super user. The book I refer to above does give instructions for changing Ubuntu so that there is a super user mode (you use sudo to do that, naturally).

Here is a web site that gives some suggestions for how to set up the hardware for a server, and also, info on installing Suse Linux.

I’d like to suggest two or three other resources that might make your bedtime reading for the next few weeks if you plan on playing server administrator. First you need Linux All-in-One For Dummies.

Then you need eitherThe UNIX Philosophy, in order to get your philosophical approach in line.

Between the above five mentioned texts, pick one from the first paragraph and zero or one from the second paragrqaph. Go to the used bookstore in your neighborhood that sells computer books (here where I am that would be Second Hand Books) and get whatever they have along these lines that is used. You don’t need current references, as these books are talking about *nix at a level where details are not important. The idea is to get down some basics, get some philosophy, and learn what sorts of things are possible by viewing these possibilities form a variety of different angles.

Then, go out and get a fairly current all in one bible type book that gives you the reference source you will need, such asA Practical Guide to Linux Commands, Editors, and Shell Programming (3rd Edition).

Some people don’t like books, and prefer on line resources. You can find all of the above on line in some form or another, and at another time I’ll make some suggestions along those lines . Some people like the book for various reasons. I like having these books as my bedtime reading. No computer, just the book. I know, that’s strange, but it’s how I roll.

An expression, by the way, that I really don’t like that much (“how I roll” … that expression).

Let’s have a look at cat (Linux, bash)

First, the video, then the discussion:

Sean claims that ‘cat’ is short for ‘concatenate’ … which is what I always thought (I’m sure ‘cat’ is ‘concatinate’ in at least one relatively common computer language other than bash).

If you man cat you do indeed get a statement that says “cat – concatenate files and print on the standard output.”

It has become fashionable over the last few years for shell programmers to eschew cat. It is often the case that using cat is redundant with some other way of doing something which is seen as better for some reason, but that reason is often rather obscure or irrelevant. Like, “you are using six more processing cycles” or whatever … on your 2.3 megahertz dual quad core computer that was otherwise mainly just sitting there handling mouse input.

So, the coolest thing about cat is that you can use it to take over the world. cat is the world’s simplest text editor. Type cat with a redirect to a file, like Sean demonstrated, and then write a C++ program that hacks the World Bank, and you’re there.

cat has a lot of options, such as -n which numbers the output lines, and -b which numbers only the none blank lines.

Personally, I like to use cat as a feeding device for some other part of a script. I use cat to produce output from a file of test data, and then I mess with that output until I get the results I’m looking for, and then I work upstream and replace the cat command with some other code (which is supposed to produce the output that the test data mimicked).

I know, I know. I’m wasting cycles. But I have extra cycles, I promise.