payday loans Quick Approval Payday loans paydayavailable.info faxless payday loans Cialis Online Canada Buy Generic Cialis Online Buy Viagra With Dapoxetine Online Buy Cheap Cialis Super Active Cheap Levitra(Vardenafil) Without Prescription Super Viagra Viagra Super Force Cialis Black Cialis Online without Prescription Pharm Support Group Viagra Online Canadian Pharmacy Viagra Coupon Buy Levitra Online.Vardenafil Buy Cheap Viagra Online Viagra with dapoxetine Vardenafil Cialis Online Canada Cheap Cialis Viagra Online without Prescription Cialis Coupon
 

Archive for the 'Linux Newbs' Category


Reading several log files at once

This is a trick that I need to use a ton on my new local coupon site: read from several log files at once in the same terminal. We’re serving digital coupons from many different servers at once and they’re each being written to a separate file.

The key is to use the “-f” flag of the unix “tail” command and to pass in all the files as arguments. Like so:

tail -f logs/*

You’ll get output that looks like this:

==> log/local-coupon/solr.log < ==
Apr 30, 2010 3:46:43 PM org.apache.solr.core.SolrCore registerSearcher
INFO: [] Registered new searcher Searcher@266c2164 main
Apr 30, 2010 3:46:43 PM org.apache.solr.search.SolrIndexSearcher close
INFO: Closing Searcher@742074cf main

==> log/local-coupon-web.lck < ==

==> log/local-coupon/db.log < ==
Apr 27, 2010 5:25:51 PM org.apache.solr.core.SolrResourceLoader Cloops
INFO: using system property solr.solr.home: /www/cloops/solr
Apr 27, 2010 5:25:51 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init() done
Apr 27, 2010 5:25:51 PM org.apache.solr.core.SolrResourceLoader Cloops
INFO: JNDI not configured for solr (NoInitialContextEx)
Apr 27, 2010 5:25:51 PM org.apache.solr.core.SolrResourceLoader Cloops
INFO: using system property solr.solr.home: /www/cloops/solr
Apr 27, 2010 5:25:51 PM org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done

==> log/local-coupon/test.log < ==
Rendered layouts/Cloops (0.2ms)
Rendered layouts/_flagged_business (3.0ms)
Rendered layouts/_footer (1.5ms)
Rendered layouts/_admin_footer (0.2ms)
Rendered layouts/_google (0.1ms)
Rendered layouts/_assets_bottom (6.3ms)
Completed in 215ms (View: 90, DB: 5) | 200 OK [http://cloops.com/business_signup]

Linux equivalents of Windows Software

GNU software provides an equivalent to almost any Windows application but for people who’re new to GNU/Linux, figuring out what they have available to them can be tricky. Photoshop doesn’t exist on *nix systems and beginners are unlikely to expect something called ‘The Gimp.’

The following website keeps an updated chart of corresponding Posix - Windows software.

http://www.linuxrsp.ru/win-lin-soft/table-eng.html

Linux is easy once you know it

John McClure got into Linux when a friend needed help installing something called ‘Red Hat’ back in 1998. That makes him an expert in my book because I only got serious about Linux a year ago. He makes an excellent point about the ease of using Linux that fits right in with the theme of this website:

From: Linux is easy once you know it
Yes my friends, Linux is so simple, a trained monkey with nimble fingers and a knack for UNIX mainframes could figure it out in several years randomly typing on a keyboard. Er, Linux is so simple, once you’ve gotten the basics down, you’re in for good. Rather than being something silly, that statement is all about how simple Linux is to manage.

Even Klingon and French are easy once you know them, it’s the learning curve that causes so much pain. Brilliant people have attempted Linux and been frightened into a fetal position. It’s for this reason that I hope Linux beginners don’t get intimidated by their new OS. It’s going to be hard at first, really. As John puts it, however, “once you’ve got the basics down, you’re in for good” - that means you’ll be hooked ;-)

The Linux Newcomers Guide

Linux.about.com has a Linux Newcomers Guide that is an excellent walkthrough of the process of choosing the right operating system, the right distribution, the right configuration, etc. Most new Linux users should be able to understand it, it’s quite straight forward.

This guides provides you with step-by-step information that you may use for the process of comparing operating systems, deciding if Linux is for you, choosing a Linux distribution, installing and configuring it, and getting software applications for your Linux environment.

For anyone considering Linux I recommend spending a little bit of time weighing certain issues to see if that move is right for you, but while you’re thinking about it I hope you get yourself a LiveCD of some kind. LiveCDs are discs that you pop in and run Linux straight off of - they don’t change your computer at all. So if you’re considering Linux at all, let it show you how much fun it is.

Free beginner’s course on Linux

Starting March 17 2005 and going until April 22 there will be a free online course for learning Linux. It’s offered jointly by the Dee-Ann LeBlanc and the HP Learning Center

It’s a free class guided by a real instructor. If you miss the starting date you’re welcome to join in late (it is the web after all). Here’s the course description:

This course is a survey for anyone who is unfamiliar with the Linux operating system. You’ll gain an understanding of the concepts and issues around Linux, find out what versions are available and how to get them, and learn how to accomplish basic installation, desktop use, and administration tasks.

Enroll at this address

What is a Linux Shell?

It occurred to me recently that there are many shells available, but I’m always interacting with a specific one. In the beginning was the Bourne shell which was highly functional, but all of us are now using the Bourne-Again SHell, or BASH as it might be acronymed. Technically it’s the GNU project’s official shell, but to the rest of us it’s the black screen with the white letters that we type into.

If you’re using a window manager like KDE or Gnome you will be familiar with ‘terminals’. Terminals are the windows that contain shells in a window manager - they are not themselves shells. You can also find a shell if you use telnet or ssh to login to your account on a computer.

Basically a shell is a program that takes your keyboard input and figures out what you’re trying to make the computer do. If you type the name of a program it’ll run a program. If you tell it to show you all the files in a given directory it’ll show you some files. There are some fancy things that can be done with shells now, such as writing code to be executed on the fly or, to a lesser degree, tab autocomplete of filenames.

I recommend you get familiar with the workings of your shell (probably BASH). If you end up spending any time working in it (and if you use Linux - you will) then you’ll enjoy knowing the shortcuts that reduce your repetitive workload.

Kickass Linux Wallpapers

If you’re running KDE on Linux you can set each virtual desktop to have it’s own background image.

I find that my different desktops are used for different purposes and should have different atmospheres to them. To make this effect I have two or three desktop wallpapers that I use across my six desktops.

Assigning a picture to a desktop is pretty easy. Right-click somewhere on your desktop (not the little virtual windows, the regular big one) and enter “Configure Desktop”. At the top of the screen that comes up you’ll see “Settings for Desktop:”. Select one of your desktops in this menu and give it some settings. Repeat this for each desktop.

To get good wallpapers for Linux, I recommend Google’s Image Search. Here is a page that will get you some good wallpapers for Linux.

Virtual Desktops on Linux-KDE

If you’re running Linux with KDE there is a way for you to separate the programs that you run. You can choose to have different ‘desktops’ or screens for your programs. In all new installations of KDE there will be by default four virtual desktops in the taskbar. They are in the shape of a four-square and you can modify both the number of desktops and the number of rows. My favorite setup is six desktops all in one row.

You can name your virtual desktops and have their names display on top of them in the taskbar. Right-click on one of the windows (one of the little squares in the tray at the bottom of the screen) and select “show” and “rows” to select number of rows. I recommend also clicking on “name” and “preview.” After that, right click on one of the windows again and select “Configure Virtual Desktops.” Here is a screen where you’ll be able to choose both the number of total desktops as well as their names.

I happen to like choosing goofy names for mine, but do whatever you like with yours. Some ideas are “Desk, Shell, Web, Dev, Files, Task” or “Web, Chat, Pictures, Music” or whatever the main things you do with your computer are. Note: you have to open the appropriate program at the appropriate window for it to go there - it won’t automatically know which window you want it to use.

I’ve found that the main benefit of multiple desktops is connected to the session feature of KDE. When you shutdown/restart your computer KDE will save the names and position of as many windows or terminals as it can. When KDE starts again it’ll try to restore all of those. This means that my file browsers in one screen always stay there and my shells in another screen stick in their place. This saves a lot of time in the long run - and it makes my workspace much more predictable.

A note to Windows users: if you want to use virtual desktops on Windows, it’s unofficially supported. Just go to the Windows XP Powertoys website and select their Virtual Desktop Manager.

Here’s another good article about virtual desktops.

The Might of File Networking

For those who have a Windows box and a Linux box on the same network (especially if it’s a home network), it’s absolutely essential that you give yourself the convenience of mounting your Windows drive in Linux.

It’s possible to make a folder on your Linux machine (I use /mnt/[computername]/[sharename] but you can use whatever folder you want) work like a folder on your Windows machine. When you navigate to it you read your Windows files, and you can save files to your Windows machine by saving them to this folder.

For a complete instruction on how to do this, check out Mounting Samba Shares Permanently. All you need is to have file sharing enabled on your Windows computer and share the folder (it could be a whole drive) that you want to access.

note: to share a folder right-click on it and click “sharing”, then give it a name.

Easiest Linux

While this site talks much of the difficulties of Linux, there is a new trend that has drastically reduced the pains of trying Linux for the first time. Live CD’s are disks that you put into your drive when the computer is off. When you start your computer you’ll find that you’re looking at and interacting with Linux. When you take the disk out and restart your computer you’re looking at Windows (or whatever) again.

Some common Live CD’s are Knoppix, Linspire (formerly Lindows), Gentoo, and several others. Some of the distributions, like Mepis Linux offer the ability to install straight to your hard drive from the Live CD. This is useful if you want to try it out at first, but then want to make the switch.

For those who are thinking of starting work with Linux, go for it. Yes, it’s hard, but you don’t have to master it to get started. Even if you don’t know the command line or what a shell is or even what this KDE and Gnome business is all about you can start using Powerpoint for Linux and writing emails on Linux immediately. So get yourself a Live CD and take a risk free tour of Linux.

Installing Linux for the first time

For the first-timers out there who’re looking to set up their first Linux server, there’s a great tutorial at LinuxPlanet
that walks through the whole procedure of obtaining Linux, preparing the box, and installing the software.
It’s not a technical article, in fact it lacks even basic depth, but it’s contains most of the information you’ll need.

Linux is now a lot simpler than you may think. We can provide you with the easiest, simplest, no-problem process for installing Linux on a PC. After going through this simple installation process, you will have a basic machine that you can configure into any kind of server, workstation, or office desktop. Future articles in this My First Linux Server series will help you build productive, Linux-based servers and small office workstations.

It’s true that Linux is getting easier. Take advantage of it and try an installation yourself.

My First Linux Server: Setting Up Gentoo

If you’re thinking of setting up a webserver that runs linux (and why would you run anything else (besides BSD)) here’s a guy who’s making a server that runs Gentoo. If you’re in the process of deciding which linux distribution is best to run a server or if you’re interested in running Fluxbox on a server, here ya go: My First Linux Server: Setting Up Gentoo

Installing Linux - not so easy…

This guy has it right. He’s got a grasp on the difficulty of Linux that still escapes many. Wait, no, nobody actually disbelieves that Linux is hard, but this guy is definitely in touch with reality.

His article is from a long time ago (back in 2001) but it’s as timely as ever. It’s an example of how most first-installs of Linux go: install slowly, get the configurations wrong, install again immediately after the first time, get things mostly correct, go crazy looking at a command prompt, switch back to Windows.

It’s becoming a very common story. My advice to anyone who feels this is familiar is this: give up when you have to, but try again soon. At least try the next version of the distribution you tried - things always get a little better with each release.

One of these days we’ll have a version of Linux that’s as easy to use as MacOSX, until then we’ll take the free stuff at it’s full cost.

Tar.Gz - Installing programs that end in “tar.gz”

If you run Linux you’ll have to install stuff. Well, you’ll want to at least. There are two main ways that programs are installed on a Linux machine: 1) from source code that’s in a *.tar.gz file and 2) from an *.rpm file. I’ll cover installing rpm files in a different article, right now it’s time to talk about installing from tar.gz files.

If you’ve got a file that is named something like “foo-bar-3.2.11.tar.gz” you can’t just run it. It’s an archive of many files not unlike a *.zip file on Windows (or even on Linux).

How to unpack a tar.gz file:
There are several ways to do this but I’m going to assume that what you want is just to unpack the archive into the same folder that it’s currently in. To do that you should type this into a terminal prompt somewhere:
cd /nameofdirectory/where/files/is
tar -xvzf foo-bar-3.2.11.tar.gz

What that does:
cd” is the command you use to change the current directory. If you were browsing through folders on a Windows computer you’d have to go find the right folder before you could do anything to a file. Likewise, in Linux it’s best to go to the folder where your file is before you start doing anything to it (note: ‘directory’ and ‘folder’ mean the same thing).
tar” is the name of the program that we’re using to unpack this file. Typing the word “tar” means that this is the program you want to run and whatever comes after it will tell it how to run.
The “-” that comes after the “tar” just means that you’re about to give the program some commands about how it’s going to run.

  • x” tells tar that you’re going to be extracting files
  • v” stands for ‘verbose’ and makes tar explain what it’s doing
  • z” is for any file that ends in “gz” because those files have been ‘Gzipped’ (compressed)
  • fforces tar to overwrite files that may already exist (usually this is fine).

foo-bar-3.2.11.tar.gz” is an example of a filename similar to what you might encounter. You type this at the end of the line.

Important Note: you may encounter many filenames that are long or hard to type, make sure you know the shortcut!

e extensive explanation, check out this (offsite) Tar Tutorial.

Now that you’ve got all the files extracted, all you have still is a bunch of source code for a program. You can’t run source code just by clicking on something, you have to ‘compile’ it first. Don’t worry, while it sounds like something that only a super-nerd would do, you can do it with two very simple commands.

Important Notice
To do any of the following you may need root privileges. Do this by typing “su”. then the root password

code you just unpacked
so after you did the tar stuff you’ll want to find the stuff that came out. type:
ls
at the same command prompt you’ve been using and see what comes up. If you had a file called foo-bar-3.2.11.tar.gz there should most likely now be a file called foo-bar-3.2.11 - notice the lack of an extension. Most of the time the *.tar.gz file will extract itself into a folder with a similar name. So now type this:
cd foo-bar-3.2.11
Of course this is just an example, you’ll want to replace the foo-bar-3.2.11 with the right folder name. Now type:
ls
and you should see the files you just extracted. Look for a file named configure.
Important Note: if there is no file named configure then read the file INSTALL for details about how to proceed. To read the file, type head -200 INSTALL

configure is a file that will prepare the installation. Type:
./configure
That’s ‘dot’ ’slash’ ‘configure’ in case you can’t see it clearly. This should make a whole bunch of random stuff show up on your screen.
Now type:
make
more random stuff will show up.
Finally type:
make install
and the final batch of random stuff will appear. When it’s done (if it doesn’t show any errors, you’ve successfully compiled and installed a Linux program!

Congratulations, you’re now a seriously nerdy person.

Long filenames - tab autocomplete

If you spend any time in a terminal, and to use Linux you kinda have to, you’ll encounter some long filenames. More than long even, they’re awkward. Combine this with the fact that Linux is case-sensitive (which means you’ll have to get the uppercase and lowercase right) and you have a bottleneck in your productivity.

It took me a pathetically long time to realize that you could have filenames filled in for you automatically. In order to save everyone else possible the embarrassment of being a try-hard, here’s some info on how to avoid typing long filenames.

Tab autocomplete
If you’re using a terminal, whether logged into your own local computer or some computer far away, whether you’re using ftp or telnet or ssh, you probably are using a shell that supports automatic filename completion.
The secret? Hit the tab key
Just start typing the filename and hit tab. If there are two or more filenames that might match what you’re typing, only a little of the filename will be filled in. When that happens, type another character or two to tell the shell more precisely which file you’re talking about and hit tab again.

If anyone has any other tricks that I haven’t posted, by all means please tell me about them in the comments. You can either tell me to write an article on it or just write one yourself and I’ll post it.

Popular Posts:


    Fatal error: Call to undefined function rjb_mostwanted() in /home/studioda/distrojockey.com/wp-content/themes/tertiary/archive.php on line 87