Monday, December 28, 2009

How to build .deb packages from tar.gz

Method 1
The common method is to use dh_make and dpkg-buildpackage to create a .deb package and install it. This is how we do it.
Step 1. Install required packages.
sudo apt-get install dh-make fakeroot build-essential autotools-dev

Step 1. Extract the contents of Tarball
tar -xvzf source.tar.gz

Step 2. Change directory to source folder
cd /path/to/source/folder

Step 3. Create control files, selecting the attributes of package.
Step 4. Finally compile the package.
sudo dpkg-buildpackage -rfakeroot

Step 5. Install all the packages, created by dpkg-buildpackage

Method 2
Another method is to use checkinstall, which is quite easier.
Some packages may use different build tools, or you may want to build application with qmake, cmake or something else instead of make. Or just wanted to be able to remove package without troubles. Use checkinstall
Step 1. Install required packages.
sudo apt-get install checkinstall
Step 2. There are no harder steps. Build your package first, your build method may differ.
./configure && make
Step 3. At the end, replace the sudo make install command with following.
sudo checkinstall -D make install
Check install will also allow you to create package with custom meta-data, It will also create a deb package which you can keep for later use. Source:

Monday, December 21, 2009

Ways To Kill Unresponsive Programs in Linux

Most Windows users know about the utility of the Ctrl + Alt + Del keys when dealing with an unresponsive application. A program is said to be unresponsive when it doesn’t respond to any user interaction and neither does it perform its intended actions. There are plenty of jokes surrounding the whole Ctrl + Alt + Del combination that brings up the task manager in Windows and allows you to end unresponsive applications. Things seldom go this far in the Linux world, however claiming that such Linux unresponsiveness doesn’t occur would be a plain lie.
The good thing about Linux is that you almost never have to hit the reset button due to unresponsive or hung applications. There are so many ways you can gain back control that you never have to resort to such extreme measures. In this article, we take a look at some of the ways you can deal with unresponsive applications on your Linux box.

Dealing with Linux Unresponsiveness – Using System Monitor

First and foremost you can use the familiar System Monitor tool. It looks a lot like the Windows Task manager, only it is better. Not only does it provide you with lots of information about the current state of the computer system, you can use the Processes tab to look for any misbehaving applications and choose to Kill or Stop the process. Both of these operations are very different in the Linux world: stop suspends the execution of the process and kill would close it completely.

kill unresponsive program

Using the ‘kill’ command

So far so good, however there are times when you cannot use the GUI altogether. Starting the System Monitor is out of question in such situations. In these situations, you can leverage the power of Linux command line to your advantage. You can enter these commands in a terminal if it is available or you can switch to a virtual terminal using Ctrl + Alt + F1 and logging in using the text mode.
Each running process has a unique process ID under Linux. If you know the process ID of the miscreant you can straightaway issue:
kill <processID>
to kill the misbehaving process. This should hopefully restore some sanity to your computer and you can switch back to the GUI using Ctrl + Alt + F7.

Using the ‘pkill’ and ‘pgrep’ commands

If on the other hand you don’t know the process ID then you can either kill the process by its name or you can analyze all the running processes to diagnose the problem (using something like the top command).

You can use the pkill command to kill using process name. As an example the following command would kill Firefox:
pkill firefox
Notice how you didn’t have to know or specify the process ID. Alternatively, you can use the pgrep command to get the process ID of any running process on the system. The process ID can then be used to kill or send other signals to the process.

Using the ‘xkill’ command

When using the GUI you can also use the xkill command which makes your mouse pointer all mighty and powerful After issuing the xkill command you can click on the application you want to kill and it will be gone and killed for you in a click!

Using the ‘killall’ command

Last but not the least, there is the killall command. Terrifying as it may seem, it doesn’t kill all the processes running on the computer. Instead it is used to kill multiple instances of the same program. eg killall firefox will kill all windows and Firefox profiles that might be currently executing.

There are a lot more to these commands than what can be covered in a short write-up. ‘pkill’ for instance, lets you search for a process not only by its name but by the user who owns the process, the time it was started or lists all the processes that do not match a certain criteria. In addition, these commands can be used to send other signals to the processes as well. By default, SIGTERM is sent which may be ignored by some processes in which case you can use the kill -9 <processID> to send a KILL signal. You can learn about all the options by reading the manuals for the respective commands.
Right click the panel click “add to panel” then “Force Quit”. From now on, you are just just two clicks to killing any unresponsive app (presuming it occupies a clickable window).
In most Linux GUIs, just press toghether Ctrl-Alt-Esc to get a killing mouse pointer (just like xkill, but easier).
If you change your mind, just press Esc to abort killing and revert to a normal pointer.Source:

Sunday, December 20, 2009

How to mount external media in Linux via Console

Most of the modern Linux distros can easily detect & mount external drives automatically. In extremely rare case they may fail to mount. At such times, knowing how to manually mount the external drives will come handy. This simple guide will show you to mount external drives like pendrive, external hard-disks, card reader etc in Linux.
First insert the drive in the USB port & then issue the following command as root;
fdisk –l (That’s an ‘L’ not an ‘i’)
This will list all the storage devices attached to your computer including your internal hard-disk. Now look for an entry below your hard-disk & make a note of the device address. It would most probably be /dev/sdb1if you just have a single hard-disk installed in your computer.
In Linux, each device has is represented by a file. So before we can mount anything we need to create a location also known as mount point. So to mount the pendrive create a new folder “pendrive” under /media. You can give any name to the folder it doesn’t matter. This can be done by issuing,
mkdir /media/pendrive
Now that our mount point is created, we need to mount the pendrive at this point to make it accessible. So issue the following command;
mount “media address” “mount point”
In our example the media address is “/dev/sdb1″ & mount point is “/media/pendrive”. So the command to mount the pendrive in our case will be;
mount /dev/sdb1 /media/pendrive
After that your pendrive should be mounted at /media/pendrive & you can view its content by navigating through file manager or via issuing;
ls /media/pendrive
After your are done working with the external drive, it needs to be unmounted before you can unplug it from the USB. To unmount the pendrive issue;
umount /media/pendrive
Do remember to close all the active applications running from the external drive or the unmount will fail.

Manage Microsoft compiled html help files in Linux

If you’ve worked in Windows long enough, you have come across the .chm file format. This format is nothing more than a compressed html directory with an included index for easy viewing. Problem is, you can’t view these files in Linux without the help of another tool. And sometimes you want to be able view these files in another format. Well, fortunately the Linux development community has solved that problem by creating various tools to manage these .chm files.
In this tutorial you are going to learn how to view .chm files and convert them to both html and pdf documents. This tutorial will be using the Ubuntu distribution, but this task can be tackled with just about any distribution available.
View chm files
Before we get into converting these files, let’s see how to simply view them in Linux. Luckily there is a single, user-friendly tool for this task. The tool – Xchm. Xchm does one thing – view compiled html documents. This tool can display the contents tree (if one exists), allows you to navigate the document, change the fonts, and search the text.
To install this tool issue the following command:
sudo apt-get install xchm
Once installed, you can start the tool from the Office sub-menu of the Applications menu. When you start the tool up you should instantly notice how simple the interface is.
In Figure 1 Xchm is opened with a Microsoft TechNet document. As you can see, you can navigate around using any link included in the document as well as with the contents tree in the left pane.
But what if you want to edit that document or convert it to a pdf document? Simple – install two more applications.
Editing chm documents
In order to edit these documents you are going to need to convert them to html documents. This conversion is done with the CHMLIB tool. To install this issue the command:
sudo apt-get install libchm-bin
After this tool is installed you can make the conversions with a command like this:
extract_chmLib file.chm output_dir
Where file.chm is the chm file you want to convert and output_dir is the name of the directory you want to output the file to. Understand that the output_dir does not (nor should) already exist, because the command will create it for you.
When the command is issued all of the contents of the chm file will be extracted into the output_dir. From there you can go into the newly created directory and edit to your hearts content.
Converting to pdf
The next task is to convert the file to a pdf document. This is done with the help of the htmldoc application. First, install this with the command:
sudo apt-get install htmldoc
The html tool is a graphical tool that allows you to add as many html documents that you want and convert them all into a single pdf file. The user interface (see Figure 2) is very simple to use.
   1. Click the Add Files button.
   2. Navigate to the directory containing your html files.
   3. Select the file(s) you want to add.
   4. Check Web Page as the document type.
   5. Click on the Output tab.
   6. Check File and then give the file a name in the output path.
   7. Check PDF as the output format.
   8. Click the Generate button.
You can also deal with the various options in the other tabs, but generating a basic PDF from your html documents is fairly straight forward. Source:

Friday, December 18, 2009

Repair a corrupted filesystem in Ubuntu

You can repair a corrupted filesystem with the program "fsck".Thesystem utility fsck (for "file system check" or "file systemconsistency check") is a tool for checking the consistency of a filesystem in Unix and Unix-like operating systems such as Linux.
Note:-File systems must be unmounted, you cannotrepair them while they are running.So fsck must ALWAYS be run on anUNmounted filesystem.Running fsck on a mounted filesystem can do SEVEREdamage.
A quick fsck options overview:
Many options for fsck exist, but the most important are:
-f which performs a FAST check
-p which fixes minor problems without user interaction
-y which gives permission to correct every problem found
-n which indicates to only search (and not correct) problems
The most simple variant to run fsck is to force fsck on restart, and then restart your system:
sudo touch /forcefsck
The other option is to swich the system to runlevel 1 (logs-out anyuserRunning fsck on a mounted filesystem can do SEVERE damage), unmountall partitions. run fsck & repair, remount all drives, increase therunlevel to 3 and continue. Source:

How to make a terminal remember sudo password for ever

When you type sudo command for the first time in a terminal it will ask you the sudo password. This password will be remembered by that terminal for 15 minutes by default.
If you want that terminal to remember your password for ever during its life time follow these steps.
1. Type at terminal
sudo visudo
2. Edit as shown below
    Defaults env_reset
    Defaults env_reset,timestamp_timeout=-1 

To make terminal ask for password every time you type sudo command:
  Defaults env_reset
  Defaults env_reset,timestamp_timeout=0 

Thursday, December 10, 2009

Install Apache, MySQL, PHP, and phpMyAdmin on Windows

Install all the software needed to run a PHP + MySQL enabled webserver on your Windows PC. All software mentionned in this article arefree.
Most easy way is to use package software to automate whole process. Check the alternate method section for easiest way.
Do do this manually follow the below mentioned steps.

Getting Started :

  • Download the Apache HTTPD Web Server from the Apache website ( Be sure to download the latest stable Win32 Binary version of Apache with the MSI Installer.
  • Download the latest stable PHP Windows Binaries with installer. (Click Here )
  • Download the latest stable Windows version, which includes a Windows Installer, of the MySQL Database Server. (Click Here )
  • Download the phpMyAdmin Database Manager file. (Click Here )
Now we have downloaded all the software. Let us install them one by one.

How to Install the Apache Web Server on Windows.

  1. Double click the downloaded msi for Apache:
  2. Click "Next>" as require.
  3. Next, fill in all the text boxes with the following information:
    • "Network Domain": localhost
    • "Server Name": localhost
    • "Administrator's Email Address": your email address
  4. Make sure the radio button "for all users, on port 80, as a service - recommended" is selected.
  5. On the next window, click the radio button "Custom", and then click "Next>".
  6. On the next window highlight "Apache HTTP Server" and click the "change" button.
  7. Weare going to install all the packages and scripts in the folderC:\Server (assuming C: is your main hard drive). So in the text box"Folder name:" type in "C:\Server\". The ending backslash is important.
  8. Click "Install" to begin the installation
  9. Click the "Finish" button.
Tocheck that the software was in fact installed successfully, open yourfavorite browser and type "http://localhost/" into the address bar andcheck the apache default page.

How to Install MySQL Database Server on Windows :

Run the MSI file and use the following settings
  1. Typical Setup
  2. Skip Sign-Up
  3. make sure "Configure the mySQL Server now" is checked.
  4. "Detailed Configuration"
  5. "Developer Machine"
  6. "Multifunctional Database"
  7. "InnoDB Tablespace Settings" - leave everything default
  8. "Decision Support (DSS)/OLAP"
  9. Makesure "Enable TCP/IP Networking" is checked and leave the port number at3306 (at this point, if you have a firewall, it will usually try toaccess itself on the localhost)
  10. "Standard Character Set"
  11. check "Install As Windows Service".
  12. I recommend leaving "Include Bin Directory in Windows PATH" checked
  13. enter your root password
  14. then hit "execute" and it´ll install and set it up.
And that's it, you're done installing MySQL.

Install the PHP Engine on Windows PC :

  1. Typical Setup.
  2. On the next window, click the radio button "Advanced", and click "Next>".
  3. We'regoing to install PHP in our server directory instead of the default PHPdirectory, so in the "Destination Folder" group, click "Browse".
  4. A browser window will open. Change the destination directory to "C:\Server\PHP". There is no need for a trailing backslash.
  5. On the following window, leave the SMTP defaults as they are, and click "Next>".
  6. If you want, you can enter an email address. This will be used as the "From:" email address when using PHP's mail function.
  7. Onthe next window, make sure that the radio button "Display all errorswarnings and notices" is clicked. Then click "Next>".
  8. Onthe next window is where you pick which web server software you areusing. Since you have installed Apache, pick "Apache" from the list.Then click "Next>".
  9. On the next window make sure that the check box ".php" is checked, and then click "Next>".
Ifa message window pops up asking, "Do you want to keep your php.inifile", click "NO". Now a message window should pop click ok.
Now PHP is installed, but we need to change some of Apache's settings to get everything working the way it should.

Configure PHP with APACHE :

  1. Browse your way to the folder "C:\Server\Apache2\conf".
  2. Open the file "httpd.conf" for editing.
  3. Scroll to the very bottom of the page, and add these lines:
    • ScriptAlias /php "c:/server/php/"
    • AddType application/x-httpd-php .php
    • Action application/x-httpd-php "/php/php-cgi.exe
  4. Hit "Enter" after the last line to ensure there is one blank line at the end of the file.

Configure PHP.INI

  1. Find the file "php.ini" in the windows directory.
  2. This moves the "php.ini" file from the Windows directory to the PHP directory ("C:\Server\php").
  3. Using Notepad, open the file "C:\Server\php\php.ini".
  4. Find that line that reads: extension_dir = "./" (or something similar, as long as its the line with "extension_dir".
  5. Change the line to: extension_dir = "c:\Server\php\ext"

Getting PHP5 to work with mySQL

Unfortunately PHP5 removed built-in support for mySQL. So you´ll needto copy some files by hand. open the folder you unzipped your PHP to.Copy the libmysql.dll file (should be located likeC:\Server\php\libmysql.dll ) into your Window´s System folder (usuallyC:\Windows\System32\ although might be c:\WinNT\System\ or something).
Then open up your php.ini in a text editor and search for ;extension=php_mysql.dll and remove the ; in front of that line.

Do the same for ;extension=php_mbstring.dll. Without the mbstringextension phpMyAdmin is unable to split strings correctly and it mayresult in unexpected results.
Restart Apache and see if you get any errors. If it complains aboutphp_mysql.dll either your extention directory isn´t correct or windowscan´t find libmysql.dll

If you don´t want to move files outside your php5 directory, you may also add the php5 directory to the PATH on Windows.
Now you are done.

How to Install phpMyAdmin on Windows

phpMyAdmin lets you control you MySQL database from a web browser.
To install PHPMyAdmin, you need to extract the .zip file to the C:\SimplePHP folder and rename the phpmyadmin folder as C:\SimplePHP\phpMyAdmin. After, open the file and find the line starting with $cfg['PmaAbsoluteUri'] and change it for :
$cfg['PmaAbsoluteUri'] = 'http://localhost/mysql/';
phpMyAdmincan also try to auto-detect the proper value if this directive is leftas it is (blank) and this line is changed to 'TRUE'...
$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;

Next, you need to locate the series of lines starting with $cfg['Servers'][$i][] and make sure the four following lines are identical :
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';

Since we installed PHPMyAdmin out of the C:\SimplePHP\root folder which is the web server's root folder, we will use a trick to make sure PHPMyAdmin is found by the web server.
To achieve this feat, you will once again need to open the httpd.conf file and insert the following code in the Aliases section (located at about two thirds of the beginning of the file) :
Alias /mysql/ "C:/SimplePHP/phpMyAdmin/" <folder "C:/SimplePHP/phpMyAdmin/">
AllowOverride None
Order deny,allow
Deny from all
Allow from
This enables us to access PHPMyAdmin by typing the below address in our browser (the "/" is very important) :
You are done!

Alternate Method

Downloadthe full package of Xampp that contains everything. It also has acontrol panel, to admin everything. Xampp is the best and easiest wayto do all this. For novice users I highly recomand Xampp.
Alternatively you can also install appserv. This program contains all you need to easily setup these programs in a Windows NT/2000/XP PC. Source:

Tuesday, December 8, 2009

Translation tools


Poedit is cross-platform gettext catalogs (.po files) editor. It is built with wxWidgets toolkit and can run on any platform supported by it (although it was only tested on Unix with GTK+ and Windows). It aims to provide more convenient approach to editing catalogs than launching vi and editing the file by hand. Poedit is free and you can view screenshots for the various supported platforms as well as download a copy on their website.

Microsoft Translation Style Guides

The Microsoft Translation Style Guides lay down the rules that should be used when translating Microsoft products. However, they offer sound advice that can be applied to any other translation.


PASSOLO is one of the smallest professional software localization tools but it offers great functionality. Check out the new features in the latest version.


WebBudget locates, classifies and counts all translatable text in an HTML file, including all ALT, BUTTON, META, JAVA, and MSGBOX labels. It also counts entire projects (folders + subfolders), from disk or online.


ALCHEMY CATALYST originally by was developed Corel to provide a solution to problems and bottlenecks caused by a fragmented localization process. The tool provides a single, interactive environment that allows translators, engineers, and project managers to manage and track multi-faceted localization projects.

WorldLingo free online MT

WorldLingo's webservice can translate emails, websites and text


Systran is one of the most widely used machine translation tools. Several TM tools has support for Systran.


MemoQ is an advanced localization workspace. Please read on to learn about the basics of localization workspaces.
During localization you transform documents available in one language into documents available in another language, taking into account the cultural specificities of the target culture. These documents usually bear some resemblance to each other; if you are a manufacturer or a service provider, most of your key documents are related to your fields of activity. If you are a translating professional, you get similar documents from your customer or you get multiple documents about the same topic, e.g. legislation-related matters or user manuals. The localization workspace takes advantage of these similarities.


The Across Personal Edition is the standalone application developed by Across and offers full translation functionality, particularly for freelance translators. The application assists you in re-using contents, controlling processes, and ensuring a high quality level. Thus, it speeds up the delivery of high-quality foreign-language contents to your customers and significantly reduces your own translation workload.

You can download a free copy for freelance translators from Across Systems’ website.


MetaTexis a nice TM that runs in Microsoft Word, it is very competitively priced and has a lot of interesting functionality and is a well constructed tool. Another thing that should make people like MetaTexis is that it can easily replace Trados, it supports read import/export all Trados formats. Give MetaTexis a try, the price wont kill you and you will not regret it.
According to Hermann Bruns, MetaTexis Developer, CAT-Tool manufacturers usually try to target large companies ignoring the costs for translators.

TM Conversion

TM Conversion from the Department for Computational Linguistics at Cotman University. They offer to convert Wordfast TM to Trados TM format as well as CVS, but also glossaries in CSV format can be formatted to Trados TM, WordFast TM or TMX format. This service can speed up translation and ensuring direct implementation of the glossary terminology in the translations. Check it out...

Star Transit

Star Transit is one of those tools that just does what is supposed to without fancy talk and flashing lights. It is a very good Translation Memory Tool, so have a look at their new power-packed version. You can download the Star Transit PE Satelitte version along with a tutorial.


WordFast is the of the least expensive TM tools available, it is basically a TRADOS clone but it does it's job better than TRADOS and can even fix files TRADOS has corrupted. We have tested WordFast under Windows, OS X and Macintosh (classic and OS X, see picture below for classic) and it performs well and we have nothing but good things to say about this TM progam.


SDLX is a translation tool with translation memory (like) functionality and a user-friendly interface. SDLx has been a rough ride in the past but I must admit that it is now both stable and pleasant to work with. SDLx is slightly better that common solutions like Trados TagEditor because you see the full sentence and not an insane segmentation of short sencences over several tokens/TUs caused by the formatting of the text. You can download a free version of SDLx lite from their website.


To be blunt avoid T-stream, it is written in Java and therefore it runs pretty sluggish by default and this is especially true for large projects. I know at least one translator who did not get paid for her work because this tool prevented her from working at the normal speed. On top of that, this "fantastic" tool has the most non-sensical Translation Quality Checking tool I have ever come across. It attempts to check if your work is in compliance with the approved glossary/terminology, but at the same time it is too inept to take the differences between singular and plural into consideration. The result is an "error" report a mile long with no real content - A REAL TIME-WASTER. Also, the TM functionality if we can call it so, is so inconsistent that you cannot rely on it to recognize even 100% matches. I am simply not impressed...


Fusion I have not tested yet but it look promising except from the fact that it is limited to languages using the latin alphabet.


DejaVu is a Spanish developed Translation Memory Tool. With this tool in your toolbox you will be able to handle the most common file formats as well as other TM formats. Not only can it work with Trados' file format, but is also superior when it comes to stability and features that give you a head start. DejaVu can assemble translations from the lexicon, terminology database and previously entered entries in the TM.
While some TM tools might be fine translation tools - DejaVu is Simply Excellent


TRADOS when someone mention the word Translation Memory, most people think of TRADOS. Even if they don't really know what it is. Lately TRADOS have developed quite a few new filters and free tools and the company has been taken over by SDL.


OmegaT is a free translation memory tool written in Java so it runs on Windows, Linux and Mac platforms. If the project is handled by a capable project manager translators can use this tool without any problems. However, in the real world you might have to solve the issues yourself. Nevertheless, it is a good program that does what it is supposed do very nicely. Now since my first use of OmegaT it has changed and improved a lot and it is now possible to choose between paragraph or sentence segmentation. Earlier versions suffered from by only offering paragraph segmentation. I think you should try OmegaT...

Project ]Open[

Project Open is a project management tool that offers a module translation project management. It is integrated with trados and uses word count information to calculate the workload of the individual translators.

1. Presales, price negotiations and reception of files
2. Project Setup and PM assignment
3. Anlysis of the project files using Trados
4. Project staffing and freelance invitation
5. The freelancers confirm their availability
6. The resource manager selects freelancers
7. Translation Workflow: Translators and editors download their files and upload results.
8. Project discussions, "queries" and incident resolution
9. The customer downloads the result files
10. Invoice generation and payment tracking

All-in-all a very comprehensive project management package. Check it out!

FineCount Freeware

An essential software package for translators and translation managers - providing a wide range of features and functionality needed for document analysis. FineCount can quickly provide detailed statistics for documents in many different formats (Microsoft Word, PDF, HTML, and many others) FineCount can also be used to prepare cost estimates and invoices for translation work. Moreover, FineCount allows the users to create their own report templates that can be reused with different documents. Here are some screenshots showing FineCount.

LTC Organiser

The LTC Organiser is a unique and innovative business process management and workflow control software system, which supports and facilitates multilingual projects. It was developed according to the requirements of The Language Technology Centre's comprehensive multilingual activities, and reflects years of experience in managing interpreting, language training, large scale multilingual translation and software localisation projects. This software is therefore of considerable use to Language Industry worldwide. It ensures transparency in organisations of any size and reduces management time and costs by up to 50%

Sun (localization)

Nice reference site with both glossaries, style guides and a wealth of other information. Sun did a good job putting this site together.

Machine Translation: An Introductory Guide

Machine Translation: An Introductory Guide is a good description of what to look for and what to take into consideration when using or think to apply MT.

ISO 639 Language Codes

A full list of ISO 639 Language Codes Source:

Sites for translation jobs

Translia Translia
Translia is an innovative online translation service that brings more jobs to translators and helps them do better and quicker translation with Internet technology. It secures payment to translators by requesting clients to deposit escrow. The best is the clients pay Translia for the service so translators don't have to.
Just register, set up the profile, and you will get notifications when there are jobs matching your profile - click the link above or paste it into the address bar of your browser to start!
I noticed one interesting paradox on the first page of this site. It claims that customers might get free translations and that same time it states that being a member of this site earns you good money. Well well well...

Tomedes Text Solutions Tomedes
When you work through Tomedes, they take care of the details so you can focus on your core business - translation. They manage project negotiations and communications issues that take you away from your work and waste your valuable time. As a translation provider, you will find a good selection of jobs at, and you can be confident of guaranteed payment for your work.

Freelancer Support Freelancer support
Freelancer support is a translation portal that provides translators with translation jobs and freelance work. Agencies and customers looking for freelance translation may post their freelance jobs for free or buy the freelancersupport database of freelance translators.

Translators Town
Johan Ericsson reports: I have just found a new website on Google and got a job very quickly, have a look at their website (, it is free to register and bid, they are new though but I never got a job from the older ones like translatorsbase or
Thanks for the tip Johan!

Translationbank Translationbank
Translationbank is yet another free jobsite for language professionals

Meet Translators Meet Translators
Meet Translators free site for professional translators and others in the language industry
Some people find great. I have never got any job from this site though. It operates with 3 membership levels, which are priced at the same level as other sites. The first level is free so why not give it a try?

TranslationDirectory Translation Directory
The Translation Directory has yet another business model, you only pay once to buy a database of translation agencies. However, you pay a lot more and then you will have the added cost to buying updates. The site has other good tools you can use such as black lists etc. Nevertheless, you can buy agency addresses and get a years membership at other job sites much cheaper.

Translator's Corner
At Translator's Corner they've developed new technology and a new system to help you conduct business safely and quickly. Their claim is "When working with us, you will never have to worry about getting paid again". Check them out at Membership is absolutely free.
Their creed: "Freelance translation the way it should be: If you don't get paid, we don't get paid."

Usenet Newsgroup
Ideally you need access to a news server, but if you don't have that you can subscribe thru Google Groups. In the newsgroups sci.lang.translation and sci.lang.translation.markedplace you can promote yourself and your services as well as finding contracts. Usenet newsgroups are free for everyone and has a lot of traffic, they provide an excellent alternative to the subscriptionbased jobsites

Translators Cafe Translators Cafe
Translators Cafe is nice and fast jobsite. However they delay job notifications to non-paying members

Babel Translation Jobs Babel Translation Jobs
Babel Translation Jobs is a group on Yahoo open for all

Translation Depot Translation Depot
Translation Depot is a group on Yahoo and it is open for all

Translatorsbase Translatorsbase
Translatorsbase calls themselves an online registry of translators an agencies, but they also charge.

GlobalOrders GlobalOrders
GlobalOrders is one of the newer sites, so let's see how they perform. They don't have many jobs yet and their graphics and layout is not very good, but on the upside... they are free of charge... so far

GoTranslators GoTranslators
GoTranslators restricts non-paying members

Language123 Language123
Language123 restricts communication between clients and non-paying members.

ProZ ProZ
ProZ works like a treat and is a source of many assignments. This is the site to be a member of if you consider the return of investment. Delays notifications to non-paying members

Aquarius Aquarius
Aquarius, strive to be the market leader in online translation outsourcing for translators, translation agencies and industry clients. Source:

Monday, December 7, 2009

25 Linux terminal commands

25) host
host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given, host prints a short summary of its command line arguments and options.
$ host is an alias for is an alias for is an alias for has address

24) dig

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than dig.
$ dig
; <<>> DiG 9.4.1-P1 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9867
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 8, ADDITIONAL: 8
;                        IN      A
;; ANSWER SECTION:         195     IN      CNAME        65      IN      CNAME 122 IN  CNAME 51      IN      A
;; AUTHORITY SECTION:             84671   IN      NS             84671   IN      NS             84671   IN      NS             84671   IN      NS             84671   IN      NS             84671   IN      NS             84671   IN      NS             84671   IN      NS
;; ADDITIONAL SECTION:          23366   IN      A          23366   IN      A          23366   IN      A          23366   IN      A        17773   IN      A        17773   IN      A        17773   IN      A       17773   IN      A
;; Query time: 27 msec
;; WHEN: Mon Aug 20 13:34:17 2007
;; MSG SIZE  rcvd: 421

23) mkdir

The mkdir utility creates the directories named as operands, in the order specified, using mode “rwxrwxrwx” (0777) as modified by the current umask(2).
$ mkdir test
$ ls -l | grep test
drwxr-xr-x  2 owner  group         512 Aug 20 13:35 test
22) rm
The rm utility attempts to remove the non-directory type files specified on the command line. If the permissions of the file do not permit writ- ing, and the standard input device is a terminal, the user is prompted (on the standard error output) for confirmation.
Example (file):
$ rm test2
$ ls -l | grep test2
Example (dir):
what you get when you try to rm a dir is:
$ rm test
rm: test: is a directory
to get around this do:
$ rm -r test
$ ls -l | grep test
21) cp
In the first synopsis form, the cp utility copies the contents of the source_file to the target_file. In the second synopsis form, the con- tents of each named source_file is copied to the destination target_directory. The names of the files themselves are not changed. If cp detects an attempt to copy a file to itself, the copy will fail.
$ cp test test2
$ ls -l | grep test
-rw-r–r–  1 owner  group           0 Aug 20 13:40 test
-rw-r–r–  1 owner  group           0 Aug 20 13:41 test2
copy a directory do:
$ cp -r test test2
$ ls -l | grep test
drwxr-xr-x  2 owner  group         512 Aug 20 13:42 test
drwxr-xr-x  2 owner  group         512 Aug 20 13:42 test2
20) grep
grep searches the named input FILEs (or standard input if no files are named, or the file name – is given) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
$ ls
example test    three
$ ls | grep th
19) ls
For each operand that names a file of a type other than directory, ls displays its name as well as any requested, associated information. For each operand that names a file of type directory, ls displays the names of files contained within that directory, as well as any requested, asso- ciated information.
$ ls
example test    three
$ ls -l
total 0
-rw-r–r–  1 owner  group  0 Aug 20 13:44 example
-rw-r–r–  1 owner  group  0 Aug 20 13:44 test
-rw-r–r–  1 owner  group  0 Aug 20 13:44 three
18) startx
The startx script is a front end to xinit that provides a somewhat nicer user interface for running a single session of the X Window Sys- tem. It is often run with no arguments.
To use startx user most have .xinitrc file in there home directory. Examples of the file are:
$ cat ~/.xinitrc
exec fluxbox
(this will start fluxbox)
$ cat ~/.xinitrc
exec gnome-session
(this will start gnome)
$ cat ~/.xinitrc
exec startkde
(this will start kde)
17) nano
nano is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package. Rather than just copying Pico’s look and feel, nano also implements some missing (or disabled by default) features in Pico, such as “search and replace” and “go to line and column number”.
$nano test
(will open test file for edit to exit type: Ctrl+X)
Vi is a screen oriented text editor. Ex is a line-oriented text edi- tor. Ex and vi are different interfaces to the same program, and it is possible to switch back and forth during an edit session. View is the equivalent of using the -R (read-only) option of vi.
$vi test
(Added on request)
to start typing on test use: i when your done type (esc)  to save type :wq! to not save use :q!
16) pwd
The pwd utility writes the absolute pathname of the current working directory to the standard output.
$ pwd
15) cat
The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order. If file is a single dash (`-’) or absent, cat reads from the standard input. If file is a UNIX domain socket, cat connects to it and then reads it until EOF. This complements the UNIX domain binding capability available in inetd(Cool.
$ cat test
this is the contents of the file test

14) man

The man utility formats and displays the on-line manual pages. This ver- sion knows about the MANPATH and PAGER environment variables, so you can have your own set(s) of personal man pages and choose whatever program you like to display the formatted pages. If section is specified, man only looks in that section of the manual. You may also specify the order to search the sections for entries and which preprocessors to run on the source files via command line options or environment variables. If enabled by the system administrator, formatted man pages will also be compressed with the “/usr/bin/gzip -c” command to save space.
$ man find
Show information about the command find
13) kill
The kill utility sends a signal to the processes specified by the pid op- erands.
$ kill 694
(694 is the id of the program running)

12) locate

The locate program searches a database for all pathnames which match the specified pattern. The database is recomputed periodically (usually weekly or daily), and contains the pathnames of all files which are pub- licly accessible.
#locate Xorg.0.log
(you man need to run /usr/libexec/locate.updatedb to update locate listing)
11) ifconfig
The ifconfig utility is used to assign an address to a network interface and/or configure network interface parameters. The ifconfig utility must be used at boot time to define the network address of each interface present on a machine; it may also be used at a later time to redefine an interface’s address or other operating parameters.
# ifconfig
em0: flags=8843 metric 0 mtu 1500
ether 00:16:41:16:28:2a
inet netmask 0xffffff00 broadcast
media: Ethernet autoselect (1000baseTX )
status: active
lo0: flags=8049 metric 0 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×2
inet6 ::1 prefixlen 128
inet netmask 0xff000000
10) ssh
ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure channel.
#ssh localhost
Welcome to FreeBSD-World
(you wouldn’t use local host you would use the computer ip or hostname you are connecting to)
9) gzip
The gzip program compresses and decompresses files using Lempel-Ziv cod- ing (LZ77). If no files are specified, gzip will compress from standard input, or decompress to standard output. When in compression mode, each file will be replaced with another file with the suffix, set by the -S suffix option, added, if possible. In decompression mode, each file will be checked for existence, as will the file with the suffix added.
$ gzip -9 test.tar
$ gzip -d test.tar.gz
$ ls | grep test.tar
8) bzip2
bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors.
$ bzip2 -9 test.tar
$ ls | grep test.tar
$ bzip2 -d test.tar.bz2
$ ls | grep test.tar
7) zip
zip is a compression and file packaging utility for Unix, VMS, MSDOS, OS/2, Windows NT, Minix, Atari and Macintosh, Amiga and Acorn RISC OS.
$ zip test
adding: test/ (stored 0%)
$ ls | grep test
$ unzip
6) tar
tar creates and manipulates streaming archive files. This implementation can extract from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, and shar archives.
$ tar -cf t2.tar example test three
$ ls | grep t2
$ tar -xf t2.tar
(files are now extracted)
5) mount
The mount utility calls the nmount(2) system call to prepare and graft a special device or the remote node (rhost:path) on to the file system tree at the point node. If either special or node are not provided, the appropriate information is taken from the fstab(5) file.
# cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad4s1b             none            swap    sw              0       0
/dev/ad4s1a             /               ufs     rw              1       1
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
# mount /cdrom
# ls /cdrom
4.1             TRANS.TBL       etc
# umount /cdrom
# ls /cdrom
(/cdrom is already listed in the fstab if it was not I would have to do ‘mount /dev/acd0 /cdrom’)
4) passwd

The passwd utility changes the user’s local, Kerberos, or NIS password. If the user is not the super-user, passwd first prompts for the current password and will not continue unless the correct password is entered.
$ passwd
Changing local password for username
Old Password:
New Password:
Retype New Password:
3) ping
The ping utility uses the ICMP protocol’s mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (“pings”) have an IP and ICMP header, followed by a “struct timeval” and then an arbitrary number of “pad” bytes used to fill out the packet.
$ ping -c 5
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=47 time=48.814 ms
64 bytes from icmp_seq=1 ttl=47 time=32.916 ms
64 bytes from icmp_seq=2 ttl=47 time=32.361 ms
64 bytes from icmp_seq=3 ttl=47 time=33.912 ms
64 bytes from icmp_seq=4 ttl=47 time=33.846 ms ping statistics —
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 32.361/36.370/48.814/6.249 ms
2) tail
The tail utility displays the contents of file or, by default, its stan- dard input, to the standard output.
# tail /var/log/auth.log
Aug 19 20:38:05 laptop su: username to root on /dev/ttyv0
Aug 20 00:10:38 laptop login: login on ttyv0 as username
Aug 20 00:11:30 laptop su: username to root on /dev/ttyp0
Aug 20 00:56:32 laptop su: username to root on /dev/ttyp1
Aug 20 01:31:26 laptop su: username to root on /dev/ttyv0
Aug 20 10:25:58 laptop login: login on ttyv0 as username
Aug 20 10:26:21 laptop su: username to root on /dev/ttyp0
Aug 20 13:58:06 laptop su: username to root on /dev/ttyp1
Aug 20 14:18:23 laptop su: username to root on /dev/ttyp1
Aug 20 14:27:39 laptop su: useranme to root on /dev/ttyp1

1) top

Top displays the top processes on the system and periodically updates this information.
last pid:  5327;  load averages:  0.00,  0.00,  0.00                                                                    up 0+04:05:41  14:30:28
44 processes:  1 running, 43 sleeping
CPU states:  0.2% user,  0.0% nice,  1.3% system,  0.0% interrupt, 98.5% idle
Mem: 198M Active, 608M Inact, 128M Wired, 26M Cache, 111M Buf, 31M Free
Swap: 1024M Total, 8K Used, 1024M Free
694 username       1  96    0 53004K 48212K select 1   4:23  0.10% Xorg
10306 username       1  96    0  7496K  4300K select 1   0:04  0.05% xterm

Sunday, December 6, 2009

15 Effective Ping Command Examples

As you already know, ping command is used to find out whether the peer host/gateway is reachable.
If you are thinking ping is such a simple command and why do I need 15 examples, you should read the rest of the article.
Ping command provides lot more options than what you might already know.

Ping Example 1. Increase or Decrease the Time Interval Between Packets

By default ping waits for 1 second before sending the next packet.You can increase or decrease this using option -i as shown below.

Increase Ping Time Interval

Example: Wait for 5 seconds before sending the next packet.
$ ping -i 5 IP

Decrease Ping Time Interval

Example: Wait 0.1 seconds before sending the next packet.
# ping -i 0.1 IP
Note: Only super user can specify interval less than 0.2 seconds. If not, you’ll get the following error message.
$ ping -i 0.1 0 ( 56(84) bytes of cannot flood; minimal interval, allowed for user, is 200ms

Ping Example 2. Check whether the local network interface is up and running

Before checking whether the peer machine is reachable, first checkwhether the local network network is up and running using any one ofthe following 3 methods.

Ping localhost using zero (0)

This is probably the easiest and simplest way to ping a local host
$ ping 0PING 0 ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=64 time=0.024 ms^C

Ping localhost using name

$ ping localhostPING localhost ( 56(84) bytes of data.64 bytes from localhost ( icmp_seq=1 ttl=64 time=0.051 ms64 bytes from localhost ( icmp_seq=2 ttl=64 time=0.055 ms^C--- localhost ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = 0.051/0.053/0.055/0.002 ms

Ping localhost using ip

$ ping
To quit the ping command, send SIGINT signal by pressing CTRL+C. Ifyou have not specified any option to make the ping to exitautomatically, then you will be terminating using CTRL+C ( SIGINT )which will show the statistics and then terminate the ping process.When everything is working properly, it should say ‘0% packet loss’
2 packets transmitted, 2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = 0.051/0.053/0.055/0.002 ms

Ping Example 3. Send N packets and stop

Send N packets specified with -c option and then stop. This way theping command can exit automatically instead of pressing CTRL+C to exit.
In the following example, ping command sends 5 packets, and waitsfor response from the destination host. Ping will exit after receivingthe response or error.
$ ping -c 5 google.comPING ( 56(84) bytes of data.64 bytes from ( icmp_seq=1 ttl=44 time=731 ms64 bytes from ( icmp_seq=2 ttl=44 time=777 ms64 bytes from ( icmp_seq=3 ttl=44 time=838 ms64 bytes from ( icmp_seq=4 ttl=44 time=976 ms64 bytes from ( icmp_seq=5 ttl=44 time=1071 ms--- ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4216msrtt min/avg/max/mdev = 731.039/879.129/1071.050/126.625 ms

Ping Example 4. Show Version and Exit

Display the current version of ping program using -V option.
$ ping -Vping utility, iputils-sss20071127

Ping Example 5. Flood the network

Super users can send hundred or more packets per second using -foption. It prints a ‘.’ when a packet is sent, and a backspace isprinted when a packet is received.
As shown below, ping -f has sent more than 400,000 packets in few seconds.
# ping -f localhostPING localhost ( 56(84) bytes of data..^C--- localhost ping statistics ---427412 packets transmitted, 427412 received, 0% packet loss, time 10941msrtt min/avg/max/mdev = 0.003/0.004/1.004/0.002 ms, ipg/ewma 0.025/0.004 ms

Ping Example 6. Audible ping: Give beep when the peer is reachable

This option is useful for sysadmin during troubleshooting. There isno need for you to look at the ping output after each and every change.You can continue working with your changes, and when the remote machinebecome reachable you’ll hear the beep automatically.
$ ping -a IP
Note: It can give beep only from terminal number 1 through 7 and gnome-terminal ( It will not work in console ).

Ping Example 7. Find out the IP address

You can identify the ip-address using the host name as shown below.
$ ping -c 1 google.comPING ( 56(84) bytes of data.64 bytes from ( icmp_seq=1 ttl=43 time=287 ms--- ping statistics ---1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 287.903/287.903/287.903/0.000 ms

Ping Example 8. Print Only Ping Command Summary Statistics

Use option -q to view only the ping statistics summary as shown below.
$ ping -c 5 -q ( 56(84) bytes of data.--- ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 3998msrtt min/avg/max/mdev = 0.047/0.053/0.061/0.009 ms

Ping Example 9. Change Ping Packet Size

You can change the packet size of ping command using -s option.
Example: Change the default packet size from 56 to 100.
$ ping -s 100 localhostPING localhost ( 100(128) bytes of data.108 bytes from localhost ( icmp_seq=1 ttl=64 time=0.022 ms108 bytes from localhost ( icmp_seq=2 ttl=64 time=0.021 ms108 bytes from localhost ( icmp_seq=3 ttl=64 time=0.020 ms^C--- localhost ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 1998msrtt min/avg/max/mdev = 0.020/0.021/0.022/0.000 ms

Ping Packet Size

In the above example, when we set the packet size to 100, itdisplays ‘128 bytes’ in the output. This is because of the Ping packetheader size, which is 28 bytes. So, if you specify the packet size as100, 28 bytes for header will be added to it and 128 bytes will be sent.
Ping Bytes Sent = Ping Packet Size + Ping Header Packet Size (28 bytes)

Ping Example 10. Timeout -w

Ping -w option specifies the deadline to terminate the ping output.This specifies the total number of seconds the ping command should sendpackets to the remote host.
The following example will ping for 5 seconds. i.e ping command willexit after 5 seconds irrespective of how many packets are sent orreceived.
$ ping -w 5 localhost
Note: When you specify both -w, and -c, whichever comes first will terminate the ping command.

Ping Example 11. Online ping

Ping from different locations and check the reachability(availability or time for reaching) of your server from differentlocations.
If you want to do an online ping, try just ping.

Ping Example 12. Option -w or -c Exits Ping

$ ping -c 4 0 -w 2PING 0 ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=64 time=0.064 ms64 bytes from icmp_seq=2 ttl=64 time=0.060 ms64 bytes from icmp_seq=3 ttl=64 time=0.058 ms--- 0 ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 1998msrtt min/avg/max/mdev = 0.058/0.060/0.064/0.009 ms$ ping -c 4 0 -w 10PING 0 ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=64 time=0.063 ms64 bytes from icmp_seq=2 ttl=64 time=0.060 ms64 bytes from icmp_seq=3 ttl=64 time=0.055 ms64 bytes from icmp_seq=4 ttl=64 time=0.061 ms--- 0 ping statistics ---4 packets transmitted, 4 received, 0% packet loss, time 2997msrtt min/avg/max/mdev = 0.055/0.059/0.063/0.009 ms

Ping Example 13. Shorter statistics with SIGQUIT

While ping is printing the individual packet status, when you want to view the shorter statistics you can use this technique.
Pressing CTRL+| (Control key followed by pipesymbol) for the shows the summary in between, and continues with itpacket sending and receiving process.
$ ping -w 100 localhostPING localhost ( 56(84) bytes of data.64 bytes from localhost ( icmp_seq=10 ttl=64 time=0.021 ms64 bytes from localhost ( icmp_seq=11 ttl=64 time=0.022 ms11/11 packets, 0% loss, min/avg/ewma/max = 0.020/0.022/0.022/0.024 ms64 bytes from localhost ( icmp_seq=12 ttl=64 time=0.021 ms64 bytes from localhost ( icmp_seq=13 ttl=64 time=0.022 ms64 bytes from localhost ( icmp_seq=14 ttl=64 time=0.021 ms64 bytes from localhost ( icmp_seq=15 ttl=64 time=0.021 ms19/19 packets, 0% loss, min/avg/ewma/max = 0.020/0.022/0.022/0.024 ms64 bytes from localhost ( icmp_seq=31 ttl=64 time=0.022 ms64 bytes from localhost ( icmp_seq=32 ttl=64 time=0.022 ms32/32 packets, 0% loss, min/avg/ewma/max = 0.020/0.022/0.022/0.027 ms64 bytes from localhost ( icmp_seq=33 ttl=64 time=0.023 ms..

Ping Example 14. Specify path for ping to send the packet

You can also specify through which path the ping should send the packet to destination.
$ ping hop1 hop2 hop3 .. hopN destination
$ ping
Note: If one of the hop in the path is not reachable then you will have failure in pinging.

Ping Example 15. Record and print route of how ECHO_REQUEST sent and ECHO_REPLY received

It records, and prints the network route through which the packet issent and received. This is useful for network engineers who wish toknow how the packet is sent and received.
$ ping -R ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=61 time=2.05 msRR: bytes from icmp_seq=2 ttl=61 time=2.00 ms      (same route)

Create and Run a Linux Script to Run Linux Commands

Creating and running a Linux script to automatically run a series of Linux commands that you commonly run is easy! With a Linux script, you put a series of routinely run commands in a text file, and then run all of them by simply typing in the name of the file and pressing Enter.
1. Run a Linux text editor.
2. Put the following text at the top left of the text file (indented below for emphasis):
This indicates that the text file is a Linux script file.
Press Enter twice to have a blank line below the line above.
3. Put the Linux command(s) in the script file.
The Linux commands below are used to provide an example. You can put any commands in a script.
The Linux commands below will: clear the screen, change into the /etc directory path, and then show the current path with the Linux pwd (path to working directory) command.
Then provide a long list of the fstab file (to show you that it’s there) and then change into your home directory (represented by the ~ symbol) and then show the path of the current directory.
The Linux echo command is not required, but has been put in the file to show the progress of the execution of the script. Also, you don’t need to indent the commands below in the Linux script – they are just indented here for emphasis.
echo The screen has been cleared
cd /etc
echo This is the etc directory
ls -l fstab
echo This is a long listing of the fstab file
cd ~
pwd echo Now in my home directory
Linux Commands Training Tips: A Linux script can contain hundreds of lines of text if necessary – and also include complex programming logic, such as if . . . then statements.
4. Save the text / script file with a meaningful name to create it and by give it a name.
For example, if you want to list files in a few directories, call the file: listdirs
5. Run the Linux chmod command to change the permissions of the file and make the Linux text file “executable”.
In our example, the file is named: listdirs
Below is a Linux chmod command example for running the chmod command to change the permissions of the Linux script file – and to make the listdirs text / script file “executable”, so that you can run the script file in the same way as you run a command.
The $ (dollar sign) below is the Linux command line prompt. Don’t type in the $ (dolar sign), type in the command that appears at the right of the $ prompt.
$ chmod u+x listdirs
The Linux command above is chmod and it is being used to assign the x (executable) permission to the u (user) of the file with: u+x and the script file name is listdirs.
Running a Linux Script to Run System Administration Commands
To run a Linux script (that is in the “current” directory), such as the listdirs script, simply type in a period (dot) and a space and then the name of the file and press Enter.
$ . listdirs
The concepts and Linux command examples shown above work in Red Hat, Ubuntu, Fedora, Slackware, and Debian Linux – and also ALL Linux distributions. Source:

Friday, December 4, 2009

Word Count in Excel

Unlike MS Word, Excel doesn't have a built in method for counting the number of words in a spreadsheet. However, you can count the number of words with a simple VBA macro.
Sub CountWords()
Dim WordCount As Long
Dim Rng As Range
Dim S As String
Dim N As Long
For Each Rng In ActiveSheet.UsedRange.Cells
S = Application.WorksheetFunction.Trim(Rng.Text)
N = 0
If S <> vbNullString Then
N = Len(S) - Len(Replace(S, " ", "")) + 1
End If
WordCount = WordCount + N
Next Rng
MsgBox "Words In ActiveSheet Sheet: " & Format(WordCount,"#,##0")
End Sub

To count the words in a single cell, you can use the following formula:

=IF(LEN(A1)=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1)

This works by first using TRIM to convert multiple spaces to single spaces and remove any leading or trailing spaces. Then it subtracts from the Length of A1 the Length of A1 after all spaces have been removed (SUBSTITUE). The difference is the number of spaces in A1. Add 1 to that and you get the number of words. The same function in VBA is shown below. Note that it uses Excel's worksheet function TRIM, not VBA's Trim function. The two are not the same. Both functions remove leading and trailing spaces, but Excel's TRIM changes multiple spaces within the string to single spaces, while VBA's Trim function leaves multiple spaces within the string intact. For example,

Debug.Print Application.WorksheetFunction.Trim(" a b c ")
a b c
Debug.Print Trim(" a b c ")
a b c

Function WordsInCell(Cell As Range) As Variant
If Cell.Cells.Count <> 1 Then
' return #VALUE if there is more
' than one cell referenced by Cell.
WordsInCell = CVErr(xlErrValue)
Exit Function
End If
If Len(Cell.Text) > 0 Then
With Application.WorksheetFunction
WordsInCell = Len(.Trim(Cell.Text)) - _
Len(.Substitute(.Trim(Cell), " ", "")) + 1
End With
WordsInCell = 0
End If
End Function

Convert a USB flash img file to vdi for use in Virtualbox

Operating Systems may be packaged as a IMG file, meant to be copied to a portable disk like a USB pen drive. Ubuntu Netbook Remix and Moblin are available as IMG files. Now if you are interested in running these operating system flash images in VirtualBox, you will have to convert the IMG file to a VDI file (VirtualBox image).
1. Download the USB boot image (IMG file) of the OS and save it to a location on your hard drive.
2. Fire up a terminal and navigate to the directory in which you saved the IMG file.
3. Run the VBoxManage tool from the command line.
$ VBoxManage convertdd image.img image.vdi
4. You may copy the newly created VDI (VirtualBox image) to a directory of your choice. Now it is ready for use in VirtualBox.

Thursday, December 3, 2009

Crack copy protected PDFs in Ubuntu Linux

In this example we assume the protected pdf file name to be 'protected.pdf'.
Now open your terminal and type.
$ pdftops protected.pdf
$ pstopdf out.pdf
The out.pdf will be your unprotected PDF.
If you don't have pstopdf and pdftops installed then type this at terminal to install them.
$ sudo apt-get install context

Tuesday, December 1, 2009

How to Establish Simple Remote Desktop Access Between Ubuntu and Windows

Teamviewer and LogMeIn are applications of choice for most Windows users when it comes to learning how to connect to a remote desktop. They are easy to use and don’t require any configuration. Sadly, both of them are not available on Linux. You can mess around trying to get them working in WINE but that would hardly be the ideal solution, especially when there are native tools available for remote desktop access for Ubuntu.
So let’s get started right away.
Adept Ubuntu users would already be thinking about the System > Preferences > Remote Desktop menu entry. Of course we will use that. However, it lets you configure your computer to allow/disallow remote desktop access. It doesn’t let you connect to a remote computer. Extra software is required for that, which we now look into.

Allow Remote Desktop Connections

First off, you would need to enable remote desktop on the Linux computer that you want to access via remote desktop. Doing so is easy by using the System > Preferences > Remote Desktop option. In the dialog that shows up – check “Allow other users to view your desktop”. You can also configure additional options like requiring password for remote access and notification icons. It is advisable to use a password for remote access, so that only trusted users may be able to establish a connection.
how do i connect to a remote desktop
With all that set up, its time to connect to it from another computer. Two possible scenarios arise: you can connect using another Linux machine, or you might want to connect using a Windows PC. Both require slightly different approaches. Here’s how.

Connecting From Another Linux Machine

Ubuntu uses Virtual Networking Connections for remote desktop. Your best bet would be to use a VNC viewer to access the remote desktop. Use the command sudo apt-get install xvnc4viewer to install VNC viewer. Now all you have to do is to issue the vncviewer <hostname/ip> command. You will be asked for a password (if it is configured on the remote machine) and you can then view and interact with the remote desktop.
how do i connect to a remote desktop

Connecting From A Windows PC

If you would to connect from a Windows computer, you can use TightVNC or uVNC (There is also a seemingly portable version available that would run off your USB drive without installing, however it stores entries in the registry). Specify the IP address and the port number (default is 5900 and is not required to be mentioned explicitly), specify bandwidth that is available to you, hit Connect and you can access the desktop of the remote machine easily.
how do i connect to a remote desktop
Mac users can also use their favorite VNC client (like Chicken of the VNC) and you should be able to remotely access the desktop of the said Linux machine.
Keep in mind that none of these clients support encryption and you have only established an unencrypted connection up until now. Teamviewer and LogMeIn encrypt the the data flow between the two computer. You can use a SSH tunnel to encrypt the flow of data. Here are the steps in brief:
  • You need OpenSSH. (sudo apt-get openssh-server).
  • Create the tunnel using ssh -L 5900:localhost:5900 <ip address>, where IP address is the address of the remote computer. If you are connecting using a Windows computer, you can use PuTTY to create a tunnel.
  • Establish the connection as before however, this time you need to connect to localhost at port 5900 (or whatever port you specified in the command above). VNC client will then utilize the tunnel you just created and traffic between the two endpoints will now be encrypted.
remote desktop connection
While this a lot of work compared to the one-click solution offered by Teamviewer or LogMeIn, it is certainly more configurable and caters to a wide variety of needs. Moreover, you only need to do the configuration once and you can also establish a VNC connection with a headless server (with some more configuration though!).

Monday, November 30, 2009

Install LAMP On Ubuntu

Install Apache

To start off we will install Apache.

1. Open up the Terminal (Applications > Accessories > Terminal).

2. Copy/Paste the following line of code into Terminal and then press enter:

sudo apt-get install apache2

3. The Terminal will then ask you for you're password, type it and then press enter.

Test Apache

To make sure everything installed correctly we will now test Apache to ensure it is working properly.

1. Open up any web browser and then enter the following into the web address:


You should see a folder entitled apache2-default/. Open it and you will see a message saying "It works!" , congrats to you!

Install PHP

In this part we will install PHP 5.

Step 1. Again open up the Terminal (Applications > Accessories > Terminal).

Step 2. Copy/Paste the following line into Terminal and press enter:

sudo apt-get install php5 libapache2-mod-php5

Step 3. In order for PHP to work and be compatible with Apache we must restart it. Type the following code in Terminal to do this:

sudo /etc/init.d/apache2 restart

Test PHP

To ensure there are no issues with PHP let's give it a quick test run.

Step 1. In the terminal copy/paste the following line:

sudo gedit /var/www/testphp.php

This will open up a file called phptest.php.

Step 2. Copy/Paste this line into the phptest file:

<?php phpinfo(); ?>

Step 3. Save and close the file.

Step 4. Now open you're web browser and type the following into the web address:


Open the test PHP page. You should get some information about PHP parameters.

Install MySQL

To finish this guide up we will install MySQL. (Note - Out of Apache and PHP, MySQL is the most difficult to set up. I will provide some great resources for anyone having trouble at the end of this guide.)

Step 1. Once again open up the amazing Terminal and then copy/paste this line:

sudo apt-get install mysql-server

Step 2 (optional). In order for other computers on your network to view the server you have created, you must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnf file.

gksudo gedit /etc/mysql/my.cnf

Change the line

bind-address =

And change the to your IP address.

Step 3. This is where things may start to get tricky. Begin by typing the following into Terminal:

mysql -u root

Following that copy/paste this line:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

(Make sure to change yourpassword to a password of your choice.)

Step 4. We are now going to install a program called phpMyAdmin which is an easy tool to edit your databases. Copy/paste the following line into Terminal:

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:

gksudo gedit /etc/php5/apache2/php.ini

Now we are going to have to uncomment the following line by taking out the semicolon (;).

Change this line:


To look like this:

Now just restart Apache and you are all set!

sudo /etc/init.d/apache2 restart

Quick note to anyone who encountered problems with setting up the MySQL password, please refer to this page: MysqlPasswordReset

I applaud everyone who has taken the time to read this guide. This guide is also my first ever so I would love to hear back from the public on what you guys think! Just don't be too harsh. ;)

* PHPMyAdmin did not work until the following was added to /etc/apache2/apache2.conf:
Include /etc/phpmyadmin/apache.conf

* Copy your web site files to: /var/www
* Copy your database files to: var/bin/mysql

* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName ...
waiting apache2:
Could not reliably determine the server's fully qualified domain name, using for ServerName [OK]
* To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
sudo gedit /etc/apache2/httpd.conf
Now, simply add the follwing line to the httpd.conf file.
ServerName localhost
Save the file and exit from gEdit. Finally restart the server.
sudo /etc/init.d/apache2 restart

The simplest way installing a LAMP server in Ubuntu or Debian is to let Tasksel do it: sudo tasksel - select 'LAMP Server' and then follow the prompts. You can make adjustments to the configuration as needed after the install but you will have a working LAMP server right out of the box! Or type directly: sudo tasksel install lamp-serverOr type directly: sudo tasksel install lamp-server