Geek Stuffs

Windows & Linux Tips, Computer Tricks & Tutorials, Free Support & Troubleshooting.

Automatic Updates is a great feature. Your computer stays protected from threats without worrying about it… but if it's 3am and I'm trying to play a video game, the last thing I want is for the automatic updates to pop up and remind me every 5 minutes that I need to reboot, interrupting my game… Drives me crazy!

Dear Restart Dialog,

I hate you.

If you want to temporarily disable this popup message and delay rebooting, you can go about it one of two ways. I'm a command line junkie, so I just type this into a command prompt (make sure you use the quotes)

net stop "automatic updates"

Or you can open Control Panel \ Administrative Tools \ Services and click Stop on automatic updates.

Do not disable the automatic updates service, just stop it. The next time you start up your computer, it will restart.

Note: If you open the Automatic Updates icon in Control Panel, it will automatically restart the service, which will make the dialog start popping up again.


Share/Save/Bookmark

If "My Computer" takes a really long time to open on your computer, you are most likely experiencing a well-known issue where Windows hangs while trying to search for network folders and printers before displaying anything to you.

This problem is easily solved, and most of you are probably familiar with the fix already, but we'll go through it anyway.

Open up Folder Options from the Tools menu in Windows Explorer:

winexpoptions.png

Then choose the View tab:

image

Uncheck the box for "Automatically search for network folders and printers", and close the dialog.

The changes should be immediate, and your problem should be gone.


Share/Save/Bookmark

Has it ever bothered you that there isn't an obvious way to remove the previous items in the Run box in Windows? It's often very useful, of course… but if you are just a little bit paranoid you might want to clean out that list on occasion.

Of course there are many cleaner applications that will do this for you, but we'll explain how to do it manually.

image

Clear Recent Run Dialog Entries Through Regedit

Open up regedit.exe through the start menu run box, and then navigate down to the following key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

image

You'll see all your recent commands on the right, and you can delete any of the keys that contain your commands. You'll have to logoff and then back on, but the list should be clean.

Note that this will also work for Windows Vista's Run dialog, although most people have switched to using the search box instead.

Completely Clear Recent Run Dialog Entries The Easier Way

Reader Ayush pointed out a much more easy solution that this registry hack-happy geek overlooked.

Right-click on the taskbar and choose Properties, then choose Start Menu.

image

Select the "Classic Start menu" option, and choose the Customize button. (Don't worry, we'll cancel out of the dialogs so you can keep the XP menu style)

Now just click the Clear button to remove all of the recent documents and applications from the start menu.

image

Once you've done that, hit Cancel and then Cancel again to make sure you don't switch to the Classic Start menu.

Note that this method will clear out everything… so if you just want to remove a single entry you need to use the registry hack method.


Share/Save/Bookmark

A hidden functionality in Windows allows you to right click on a file, select Copy To Folder or Move To Folder, and the move to box will pop up and let you choose a location to either copy or move the file or folder to.

Here's the quick registry hack to get this working. As usual, back up your registry just in case. You will want to browse down to this key:

HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers

Once you are at that key, right click and choose the New Key option:

Now you will double-click on the (Default) value and enter the following:

{C2FBB630-2971-11D1-A18C-00C04FD75D13}

Click OK and continue.

If you want to enable Move To, you will repeat the same steps, except creating a new key named Move To, and using this value:

{C2FBB631-2971-11D1-A18C-00C04FD75D13}

Now when you right click on a file or folder, you should see the following options:

Let's click Copy To Folder just to see what happens….

And that's it. Useful!





Share/Save/Bookmark

In these days of high definition videos everywhere (even YouTube), only the truly geeky would decide to watch their movies in ASCII text in a terminal window. The surprising thing is that some videos are even fairly watchable.

image

I've found that cartoons work best because of the limited detail. Even more importantly, the series finale and (probably) last ever Futurama movie is coming out Tomorrow on DVD! You can pre-order Futurama: Into the Wild Green Yonder on Amazon.

Watch Movies in ASCII

The first thing you'll want to do is make sure that mplayer is installed, which is easy enough from the command line:

sudo apt-get install mplayer

Then, to actually watch the movies from a terminal window, use the following syntax, replacing MovieName with the filename of your video.

mplayer -vo caca MovieName.avi

The "caca" command is actually the color text driver - you could also use " -vo aa " instead for black & white, but that would just be silly.

image

These screenshots don't really do it justice - it's seriously just as bad when you're watching.

image

Sequences with a lot of contrast work better…

image

And it wouldn't help to sit about 8 feet back from the monitor.

image






Share/Save/Bookmark

Do you want to easily find detailed information about your Windows PC in one easy to use application? There are several system information utilities available and today we will look at three that do a very good job.

SIW – System Information for Windows

You can run run it from a USB stick or use the installer version which is free for personal use. There is also a Business and Technician's version that allow the creation of reports in different formats. SIW looks deep into your system and reports on software, hardware, the OS, and essentially anything else you can imagine.

SIW

You can add even more hardware and software categories by going into preferences.

preferences

Download SIW (System Information for Windows)

AusLogics System Information

This free utility from AusLogics does a good job of presenting different aspects of your system information in an attractive, easy to use interface. Categories include General Information, Operating System, Devices, Video, Memory Usage, Performance, Hard Drive, Programs, USB devices, and Network.

Auslogic performance

You can create full detailed reports in HTML, XML, or plain text.

Report

Download AusLogics System Information

Sysinternals Suite

Finally we will look at what is arguably the most comprehensive system info utility…Sysinternals Suite from Mark Russinovich. This suite is a collection of more than 60 individual tools and help files for all aspects of your system. There are far to many great tools in this collection one of which is Autoruns, a great utility to see every single startup item such as applications, explorer add-ons, drivers, services and much more.

Autoruns

Also included in the suite is Desktops 1.0 which is a very neat virtual desktop app that allows up to 4 desktops on one screen, similar to the Linux feature, this comes in very handy in XP and Vista Home edition.

Desktops

You can choose your hotkey combination to toggle through the different desktops.

options

Download Sysinternals Suite





Share/Save/Bookmark

I can say with certainty that almost all the people reading this blog display a degree of knowledge in using a computer. But how many of us have actually opened a computer and tried to figure out and correctly identify the different parts in it ? Not all of us I believe.

So for those who are in the dark, here is a crash course in understanding the architecture of a motherboard. This relatively old article explains the different parts of the motherboard and in what way each part contributes in the overall working of a computer. The article written by Jon Stokes starts from the basics and gradually move into relatively technical jargon such as northbridge and southbridge, the different buses, their protocols and bridges.

Motherboard architectureFig: The motherboard layout

While this article is nearly two years old and I am sure, the technology has moved forward a great deal in this time, nevertheless, it gives an insight into what comprises a motherboard in a computer.

Read the article to find out more.

Share/Save/Bookmark

Sometimes when you try to execute a long command, it scrolls beyond the screen. Then if you want to modify the command and re-execute it, there is an easy way for it. Just type "fc" which will load the command in your default editor; in my case vi. Now you can modify the command in the editor and exit the editor, and your modified command is executed automatically.
For example try typing the following command in the bash shell and type "fc".
$ find /etc -iname '*.conf' -exec grep -H 'log' {} \;
$ fc
"fc" will bring the last command typed into an editor, "vi" if that's the default editor. Of course you can specify a different editor by using the -e switch as follows:
$ fc -e emacs
To list last few commands, type:
$ fc -l
For the last 10 commands it will be:
$ fc -l -10
To seach for a command, type "CTRL+r" at the shell prompt for starting a search as you type prompt. Once you found your command, press enter to execute it.
If you want to transpose two characters say you typed 'sl' instead of 'ls'. Then move the cursor between 'sl' and type "CTRL+t".

Share/Save/Bookmark

If you have installed Linuxusing the text installer, then you will find a neat professional looking install process. You can rest assured that no extreme programminghas gone into creating the text installer. In fact, it has been created using a utility called dialog. Dialog is a utility installed by default on all major Linux distros. It is used to create professional looking dialog boxes from within shell scripts.

Some of the dialogs supported are Input boxes, Menu, checklist boxes, yes/no boxes, message boxes, radiolist boxes and text boxes.

Creating a dialog is very easy. Here I will explain how to create dialog boxes of different types.
Input boxes : These allows the user to enter a string. After the user enters the data, it is written to standard error . You may also redirect the output to a file.
$ dialog --title "Ravi's Input Box" 
--inputbox
"Enter the parameters..."
8
40
As you can see, the options are self explanatory. The last two options 8 and 40 are the height and width of the box respectively.

Fig: Inputbox

Textbox : This is a box which takes a file as the parameter and shows the file in a scrollable box.
$ dialog --title "textbox" --textbox ./myfile.txt 22 70 
... it shows the file myfile.txt in a textbox.

Fig: Textbox showing the file.

Checklist : The user is presented with a list of choices and can toggle each one on or off individually using the space bar.
$ dialog --checklist "Choose your favorite distribution:" 
10 40 3
1 RedHat on
2 "Ubuntu Linux" off
3 Slackware off
... here, 10 is the height of the box, 40 - width, 3 is the number of choices, and the rest are the choices numbered 1,2 and 3.

Radiolist: It displays a list containing radio buttons. And the user can only choose one option from the set of options.
$ dialog --backtitle "Processor Selection" 
--radiolist "Select Processor type:"
10 40 4
1 Pentium off
2 Athlon on
3 Celeron off
4 Cyrix off
10 and 40 are the height and width respectively. 4 denotes the number of items in the list.

Infobox: This is useful for displaying a message while an operation is going on. For example, see the code below:
$ dialog --title "Memory Results" 
--infobox "`echo ;vmstat;echo ;echo ;free`"
15 85

Fig: Information box - listing the vmstat and free listing.

Fig: Message box

Dialog is usually used inside a script which gives the script a degree of user friendliness. There is another package called Xdialog which gives the same features for scripts executed in X windows. Xdialog utility also has additional functionality not found in the dialog utility.
To know more about the dialog utility check the man page of dialog.




Share/Save/Bookmark

One thing that really makes working in the command line in Linux
a pleasure is the various in-built shortcuts and name completion features in Bash - the default shell in Linux.

But one grouse I always had was it was really difficult to remember all the options that each command had. For example, 'find' came with numerous options which I found difficult to memorize and had to resort to reading the man page each time I had to use the command. Now you can enhance the bash shell to give you the added functionality of listing the options that can be used with a command. For that you should download and install an add-on package called bash-completion. I use Fedora Core 2 but if you are using the latest Linux distribution, it might be installed by default on your machine.
In Debian based Linux distributions, you may install it using the following command :

# apt-get install bash-completion

After installing the bash-completion package, fire up a terminal and type:

$ grep - -

... followed by two TABs and you get all the options that can be passed to the grep command (see figure). This works for any command in linux. Now you don't have to remember all those options that need be passed to the programs any longer.


Share/Save/Bookmark

Bash, which is the default shell in Linux contains a whole lot of key bindings which makes it really easy to use . The most commonly used shortcuts are listed below :

____________CTRL Key Bound_____________

Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen
Ctrl + r - Search the history backwards
Ctrl + R - Search the history backwards with multi occurrence
Ctrl + u - Delete backward from cursor
Ctrl + xx - Move between EOL and current cursor position
Ctrl + x @ - Show possible hostname completions
Ctrl + z - Suspend/ Stop the command

____________ALT Key Bound___________

Alt + <
- Move to the first line in the history
Alt + > - Move to the last line in the history
Alt + ? - Show current completion list
Alt + * - Insert all possible completions
Alt + / - Attempt to complete filename
Alt + . - Yank last argument to previous command
Alt + b - Move backward
Alt + c - Capitalize the word
Alt + d - Delete word
Alt + f - Move forward
Alt + l - Make word lowercase
Alt + n - Search the history forwards non-incremental
Alt + p - Search the history backwards non-incremental
Alt + r - Recall command
Alt + t - Move words around
Alt + u - Make word uppercase
Alt + back-space - Delete backward from cursor

----------------More Special Keybindings-------------------

Here "2T" means Press TAB twice

$ 2T - All available commands(common)
$ (string)2T - All available commands starting with (string)
$ /2T - Entire directory structure including Hidden one
$ 2T - Only Sub Dirs inside including Hidden one
$ *2T - Only Sub Dirs inside without Hidden one
$ ~2T - All Present users on system from "/etc/passwd"
$ $2T - All Sys variables
$ @2T - Entries from "/etc/hosts"
$ =2T - Output like ls or dir

Share/Save/Bookmark

Would you like to have all the important Linux and FreeBSD commands with suitable examples fit in a couple of pages ? If you do, then you have got your wish.

Colin Barschel has put together what he calls the Unix Toolbox. This is a fabulous piece of compilation which contain all the frequently useful commands in Linux and their equivalents in FreeBSD. This document covers a wide range of topics divided into 22 sections such as system, processes, file systems, network related, VPN, cryptography, installing and managing software and so on.

What I really like about Unix toolbox is that it is well structured, each section has a Linux subsection immediately followed by a FreeBSD subsection which explains equivalent commands in FreeBSD. Secondly, the document is made available in multiple formats namely PDF, HTML page, booklet version fit to be printed and made into a small booklet and so on.

A very good resource for any Linux/FreeBSD enthusiast. There is also an additional bonus. Visit the homepage of this site and you get a FreeBSD console right within your web browser. As of now there are 30 commands which can be used. Colin has used the termlib library to create the virtual terminal.

Share/Save/Bookmark

First let me clarify that this is not going to be a detailed study of shell scripting, but as the name of the post indicates, it will be a quick reference to the syntax used in scripting for the bash shell. So if you are expecting the former, then you should buy yourself a good book on shell scripting . ;-) So let's move on to the guide. Start your stop watch now.

-- Start of The 10 secs Guide to Bash Scripting --

Common environment variables

PATH - Sets the search path for any executable command. Similar to the PATH variable in MSDOS.
HOME - Home directory of the user.
MAIL - Contains the path to the location where mail addressed to the user is stored.
IFS - Contains a string of characters which are used as word seperators in the command line. The string normally consists of the space, tab and the newline characters. To see them you will have to do an octal dump as follows:

$ echo $IFS | od -bc

PS1 and PS2 - Primary and secondary prompts in bash. PS1 is set to $ by default and PS2 is set to '>' . To see the secondary prompt, just run the command :

$ ls |

... and press enter.

USER - User login name.
TERM - indicates the terminal type being used. This should be set correctly for editors like vi to work correctly.
SHELL - Determines the type of shell that the user sees on logging in.


Note: To see what are the values held by the above environment variables, just do an echo of the name of the variable preceeded with a $. For example, if I do the following:

$ echo $USER
raja

... I get the value stored in the environment variable USER.

Some bash shell scripting rules

1) The first line in your script must be

#!/bin/bash

... that is a # (Hash) followed by a ! (ban) followed by the path of the shell. This line lets the environment know the file is a shell script and the location of the shell.

2) Before executing your script, you should make the script executable. You do it by using the following command:

$ chmod ugo+x your_shell_script.sh

3) The name of your shell script must end with a .sh . This lets the user know that the file is a shell script. This is not compulsary but is the norm.

Conditional statements

The 'if' Statement - evaluates a condition which accompanies its command line. Those words marked in blue are compulsory. But those marked in red are optional.

syntax:

if condition_is_true
then
execute commands
else
execute commands
fi

if condition also permits multiway branching. That is you can evaluate more conditions if the previous condition fails.
if condition_is_true
then
execute commands
elif another_condition_is_true
then
execute commands
else
execute commands
fi
Example :
if grep "linuxhelp" thisfile.html
then
echo "Found the word in the file"
else
echo "Sorry no luck!"
fi
if's companion - test
test is an internal feature of the shell. test evaluates the condition placed on its right, and returns either a true or false exit status. For this purpose, test uses certain operators to evaluate the condition. They are as follows:

Relational operators

-eq Equal to
-lt Less than
-gt Greater than
-ge Greater than or equal to
-lt Less than
-le Less than or equal to

File related tests

-f file True if file exists and is a regular file
-r file True if file exists and is readable
-w file True if file exists and is writable
-x file True if file exists and is executable
-d file True if file exists and is a directory
-s file True if file exists and has a size greater
than zero.
String tests

-n str True if string str is not a null string
-z str True if string str is a null string
str1 == str2 True if both strings are equal
str1 != str2 True if both strings are unequal
str True if string str is assigned a value
and is not null.
Test also permits the checking of more than one expression in the same line.

-a Performs the AND function
-o Performs the OR function
Example:

test $d -eq 25 ; echo $d
... which means, if the value in the variable d is equal to 25, print the value.

test $s -lt 50; do_something


if [ $d -eq 25 ]
then
echo $d
fi

In the above example, I have used square brackets instead of the keyword

test - which is another way of doing the same thing.

if [ $str1 == $str2 ]
then
do something
fi
if [ -n "$str1" -a -n "$str2" ]
then
echo 'Both $str1 and $str2 are not null'
fi
... above, I have checked if both strings are not null then execute the echo command.

Things to remember while using test

If you are using square brackets [] instead of test, then care should be taken to insert a space after the [ and before the ].

Note: test is confined to integer values only. Decimal values are simply truncated.

Do not use wildcards for testing string equality - they are expanded by the shell to match the files in your directory rather than the string.

Case statement

Case statement is the second conditional offered by the shell.

Syntax:

case expression in
pattern1) execute commands ;;
pattern2) execute commands ;;
...
esac
The keywords here are in, case and esac. The ';;' is used as option terminators. The construct also uses ')' to delimit the pattern from the action.

Example:

...
echo "Enter your option : "
read i;
case $i in
1) ls -l ;;
2) ps -aux ;;
3) date ;;
4) who ;;
5) exit
esac
Note: The last case option need not have ;; but you can provide them if you want.

Here is another example:

case `date |cut -d" " -f1` in
Mon) commands ;;
Tue) commands ;;
Wed) commands ;;
...
esac
Case can also match more than one pattern with each option.You can also use shell wild-cards for matching patterns.

...
echo "Do you wish to continue? (y/n)"
read ans
case $ans in
Y|y) ;;
[Yy][Ee][Ss]) ;;
N|n) exit ;;
[Nn][Oo]) exit ;;
*) echo "Invalid command"
esac

In the above case, if you enter YeS, YES,yEs and any of its combinations, it will be matched.

This brings us to the end of conditional statements.

Looping Statements

while loop

Syntax :

while condition_is_true
do
execute commands
done
Example:

while [ $num -gt 100 ]
do
sleep 5
done
while :
do
execute some commands
done
The above code implements a infinite loop. You could also write 'while true' instead of 'while :' .
Here I would like to introduce two keywords with respect to looping conditionals. They are break and continue.
break - This keyword causes control to break out of the loop.

continue - This keyword will suspend the execution of all statements following it and switches control to the top of the loop for the next iteration.

until loop

Until complements while construct in the sense that the loop body here is executed repeatedly as long as the condition remains false.

Syntax:

until false
do
execute commands
done
Example:

...
until [ -r myfile ]
do
sleep 5
done
The above code is executed repeatedly until the file myfile can be read.

for loop

Syntax :

for variable in list
do
execute commands
done
Example:

...
for x in 1 2 3 4 5
do
echo "The value of x is $x";
done

Here the list contains 5 numbers 1 to 5. Here is another example:

for var in $PATH $MAIL $HOME
do
echo $var
done
Suppose you have a directory full of java files and you want to compile those. You can write a script like this:

...
for file in *.java
do
javac $file
done
Note: You can use wildcard expressions in your scripts.

A few special symbols and their meanings w.r.t shell scripts

$* - This denotes all the parameters passed to the script
at the time of its execution. Which includes $1, $2
and so on.
$0 - Name of the shell script being executed.
$# - Number of arguments specified in the command line.
$? - Exit status of the last command.
The above symbols are known as positional parameters. Let me explain the positional parameters with the aid of an example. Suppose I have a shell script called my_script.sh . Now I execute this script in the command line as follows :

$ ./my_script.sh linux is a robust OS

... as you can see above, I have passed 5 parameters to the script. In this scenario, the values of the positional parameters are as follows:

$* - will contain the values 'linux','is','a','robust','OS'.
$0 - will contain the value my_script.sh - the name of the script being
executed.
$# - contains the value 5 - the total number of parameters.
$$ - contains the process ID of the current shell. You can use this parameter while giving unique names to any temporary files that you create at the time of execution of the shell.

$1 - contains the value 'linux'
$2 - contains the value 'is'
... and so on.

The set and shift statements

set - Lets you associate values with these positional parameters .

For example, try this:

$ set `date`
$ echo $1
$ echo $*
$ echo $#
$ echo $2
shift - transfers the contents of a positional parameter to its immediate lower numbered one. This goes on as many times it is called.

Example :

$ set `date`
$ echo $1 $2 $3
$ shift
$ echo $1 $2 $3
$ shift
$ echo $1 $2 $3
To see the process Id of the current shell, try this:

$ echo $$
2667
Validate that it is the same value by executing the following command:

$ ps -f |grep bash
read statement

Make your shell script interactive. read will let the user enter values while the script is being executed. When a program encounters the read statement, the program pauses at that point. Input entered through the keyboard id read into the variables following read, and the program execution continues.

Eg:

#!/bin/sh
echo "Enter your name : "
read name
echo "Hello $name , Have a nice day."
Exit status of the last command

Every command returns a value after execution. This value is called the exit status or return value of the command. A command is said to be true if it executes successfully, and false if it fails. This can be checked in the script using the $? positional parameter.

Here I have given a concise introduction to the art of bash shell scripting in Linux. But there is more to shell scripting than what I have covered. For one, there are different kinds of shells, bash shell being only one of them. And each shell has a small variation in its syntax. Like the C shell for example, which uses a syntax close to the C language for scripting. But what I have covered above applys to all the shells.
Share/Save/Bookmark

Online video streaming has been the rage for some time now – and we can view countless videos through sites like YouTube and Metacafe - but what happens if you find a video you really like and would like to store it for offline viewing or to watch it on a mobile device? Unfortunately, we are limited only to streaming as there is no option to download the videos on YouTube. Well, fret not as we have at our disposal easy-to-use tools that make downloading such videos possible.

1. How to Download Videos with One Click

keepvid

KeepVid is a web-based video downloader. Perfect for those who are on the go or do not wish to install additional applications on their computer, KeepVid oozes simplicity and idiot-proof video downloading. To download YouTube videos, simply copy the URL of the YouTube video page you wish to download, and paste it in the Keepvid Textbox. A link will then appear which allows you to save the .flv video file to your computer! As an added bonus, KeepVid can also download videos from several other video streaming services such as Metacafe. It also comes with a bookmarklet so you can download any video you’re watching with one click.

2. How to Download Videos Directly from the URL Box

kissyoutube

Another funky and ingenious method to download videos from YouTube is to add a kiss to the video you wish to download, literally! How would you do that? Simple, just add the word ‘kiss’ in front of the ‘youtube’ word in the URL and press enter. You will then be brought to the download page with a link to the .flv video. For example, say we want to download this Super Bowl video. The original URL would be “http://www.youtube.com/watch?v=9jxyYwrKIKQ”. Now just add a kiss, and make it “http://www.kissyoutube.com/watch?v=9jxyYwrKIKQ” for the download. Simple as that! Java is required for this website to work, though.

3. How to Convert .flv Videos On The Fly

vixy

Now this is a tool you won’t want to miss! Vixy.net is both a web-based YouTube video downloader and converter! While many popular media players such as Windows Media Player and Quicktime aren’t capable of playing back .flv extensions (which YouTube videos are streamed in), Vixy.net solves those problems by offering a free conversion service along with any download. After entering the URL of the desired video, just choose the file type you wish to convert into (there is AVI, 3GP, and MOV, among others). This is a truly convenient way of making YouTube videos more accessible to other media players.

4. Where to Find YouTube Download Software

youtube

For those who fancy having gadgets and utilities lying around their computer desktops, YouTube Downloader is the perfect tool! As a free download from Download.com, this nifty little program can easily download YouTube videos – just copy and paste the video URL and press the button! Its additional feature includes a built-in video converter to convert downloaded .flv files into other more convenient formats.

5. Where to Find an Awesome Firefox Plugin to Download Videos

firefox

Firefox fans rejoice! Now there is a quick and convenient way to extract your favorite YouTube videos using this add-on. Besides YouTube, this plug-in supports other video streaming sites including Metacafe, Google Videos and Dailymotion, among others. Just surf like normal and when DownloadHelper detects a downloadable object, its icon will animate, allowing you to download the streaming video.

Would you download a youtube video? Tell me in the comments!


Share/Save/Bookmark

I have been asked by many people to explain the file system hierarchy in Linux because they find the file system in Linux quite different from what they are used to in Windows. To put it simply, it can be visualized as a tree with its roots and all. At the top of the hierarchy is invariably the root path which is represented by '/'. All other directories are created beneath this root path. And each of the sub directories have a specific purpose. For example, '/etc' contain the configuration files, the '/opt' directory is used to install third party software, '/boot' contain the grub files and the Linux kernel and so on.

source: Linuxconfig

Fig: Linux file system hierarchy

Share/Save/Bookmark

dmidecode command reads the system DMI table to display hardware and BIOS information of the server. Apart from getting current configuration of the system, you can also get information about maximum supported configuration of the system using dmidecode. For example, dmidecode gives both the current RAM on the system and the maximum RAM supported by the system.

This article provides an overview of the dmidecode and few practical examples on how to use dmidecode command.


Share/Save/Bookmark

Wakeonlan (wol) enables you to switch ON remote servers without physically accessing it. Wakeonlan sends magic packets to wake-on-LAN enabled ethernet adapters and motherboards to switch on remote computers.

By mistake, when you shutdown a system instead of rebooting, you can use Wakeonlan to power on the server remotely. Also, If you have a server that don’t need to be up and running 24×7, you can turn off and turn on the server remotely anytime you want.

This article gives a brief overview of Wake-On-LAN and instructions to set up Wakeonlan feature.

Share/Save/Bookmark

Apart from the basic operation of looking for files under a directory structure, you can also perform several practical operations using find command that will make your command line journey easy.

In this article, let us review 15 practical examples of Linux find command that will be very useful to both newbies and experts.


Share/Save/Bookmark

XML in 10 points


XML, XLink, Namespace, DTD, Schema, CSS, XHTML ... If you are new to XML, it may be hard to know where to begin. This summary in 10 points attempts to capture enough of the basic concepts to enable a beginner to see the forest through the trees. And if you are giving a presentation on XML, why not start with these 10 points?

1. XML is for structuring data

Structured data includes things like spreadsheets, address books, configuration parameters, financial transactions, and technical drawings. XML is a set of rules (you may also think of them as guidelines or conventions) for designing text formats that let you structure your data. XML is not a programming language, and you don't have to be a programmer to use it or learn it. XML makes it easy for a computer to generate data, read data, and ensure that the data structure is unambiguous. XML avoids common pitfalls in language design: it is extensible, platform-independent, and it supports internationalization and localization. XML is fully Unicode-compliant.

2. XML looks a bit like HTML

Like HTML, XML makes use of tags (words bracketed by '<' and '>') and attributes (of the form name="value"). While HTML specifies what each tag and attribute means, and often how the text between them will look in a browser, XML uses the tags only to delimit pieces of data, and leaves the interpretation of the data completely to the application that reads it. In other words, if you see "

" in an XML file, do not assume it is a paragraph. Depending on the context, it may be a price, a parameter, a person, a p... (and who says it has to be a word with a "p"?).

3. XML is text, but isn't meant to be read

Programs that produce spreadsheets, address books, and other structured data often store that data on disk, using either a binary or text format. One advantage of a text format is that it allows people, if necessary, to look at the data without the program that produced it; in a pinch, you can read a text format with your favorite text editor. Text formats also allow developers to more easily debug applications. Like HTML, XML files are text files that people shouldn't have to read, but may when the need arises. Compared to HTML, the rules for XML files allow fewer variations. A forgotten tag, or an attribute without quotes makes an XML file unusable, while in HTML such practice is often explicitly allowed. The official XML specification forbids applications from trying to second-guess the creator of a broken XML file; if the file is broken, an application has to stop right there and report an error.

4. XML is verbose by design

Since XML is a text format and it uses tags to delimit the data, XML files are nearly always larger than comparable binary formats. That was a conscious decision by the designers of XML. The advantages of a text format are evident (see point 3), and the disadvantages can usually be compensated at a different level. Disk space is less expensive than it used to be, and compression programs like zip and gzip can compress files very well and very fast. In addition, communication protocols such as modem protocols and HTTP/1.1, the core protocol of the Web, can compress data on the fly, saving bandwidth as effectively as a binary format.

5. XML is a family of technologies

XML 1.0 is the specification that defines what "tags" and "attributes" are. Beyond XML 1.0, "the XML family" is a growing set of modules that offer useful services to accomplish important and frequently demanded tasks. XLink describes a standard way to add hyperlinks to an XML file. XPointer is a syntax in development for pointing to parts of an XML document. An XPointer is a bit like a URL, but instead of pointing to documents on the Web, it points to pieces of data inside an XML file. CSS, the style sheet language, is applicable to XML as it is to HTML. XSL is the advanced language for expressing style sheets. It is based on XSLT, a transformation language used for rearranging, adding and deleting tags and attributes. The DOM is a standard set of function calls for manipulating XML (and HTML) files from a programming language. XML Schemas 1 and 2 help developers to precisely define the structures of their own XML-based formats. There are several more modules and tools available or under development. Keep an eye on W3C's technical reports page.

6. XML is new, but not that new

Development of XML started in 1996 and it has been a W3C Recommendation since February 1998, which may make you suspect that this is rather immature technology. In fact, the technology isn't very new. Before XML there was SGML, developed in the early '80s, an ISO standard since 1986, and widely used for large documentation projects. The development of HTML started in 1990. The designers of XML simply took the best parts of SGML, guided by the experience with HTML, and produced something that is no less powerful than SGML, and vastly more regular and simple to use. Some evolutions, however, are hard to distinguish from revolutions... And it must be said that while SGML is mostly used for technical documentation and much less for other kinds of data, with XML it is exactly the opposite.

7. XML leads HTML to XHTML

There is an important XML application that is a document format: W3C's XHTML, the successor to HTML. XHTML has many of the same elements as HTML. The syntax has been changed slightly to conform to the rules of XML. A format that is "XML-based" inherits the syntax from XML and restricts it in certain ways (e.g, XHTML allows "

", but not ""); it also adds meaning to that syntax (XHTML says that "

" stands for "paragraph", and not for "price", "person", or anything else).

8. XML is modular

XML allows you to define a new document format by combining and reusing other formats. Since two formats developed independently may have elements or attributes with the same name, care must be taken when combining those formats (does "

" mean "paragraph" from this format or "person" from that one?). To eliminate name confusion when combining formats, XML provides a namespace mechanism. XSL and RDF are good examples of XML-based formats that use namespaces. XML Schema is designed to mirror this support for modularity at the level of defining XML document structures, by making it easy to combine two schemas to produce a third which covers a merged document structure.

9. XML is the basis for RDF and the Semantic Web

W3C's Resource Description Framework (RDF) is an XML text format that supports resource description and metadata applications, such as music playlists, photo collections, and bibliographies. For example, RDF might let you identify people in a Web photo album using information from a personal contact list; then your mail client could automatically start a message to those people stating that their photos are on the Web. Just as HTML integrated documents, images, menu systems, and forms applications to launch the original Web, RDF provides tools to integrate even more, to make the Web a little bit more into a Semantic Web. Just like people need to have agreement on the meanings of the words they employ in their communication, computers need mechanisms for agreeing on the meanings of terms in order to communicate effectively. Formal descriptions of terms in a certain area (shopping or manufacturing, for example) are called ontologies and are a necessary part of the Semantic Web. RDF, ontologies, and the representation of meaning so that computers can help people do work are all topics of the Semantic Web Activity.

10. XML is license-free, platform-independent and well-supported

By choosing XML as the basis for a project, you gain access to a large and growing community of tools (one of which may already do what you need!) and engineers experienced in the technology. Opting for XML is a bit like choosing SQL for databases: you still have to build your own database and your own programs and procedures that manipulate it, but there are many tools available and many people who can help you. And since XML is license-free, you can build your own software around it without paying anybody anything. The large and growing support means that you are also not tied to a single vendor. XML isn't always the best solution, but it is always worth considering.


Share/Save/Bookmark


Zamzar
zamzar is free and all-inclusive(video, music, images, documents) file conversion service. In 4 quick steps you can convert almost anything to anything else; (1)simply enter a file you want to convert by pointing to its location on your local drive or address on the web(ex; youtube video), (2)select output format(eg. PDF, doc, 3GP mobile, iPod, PSP…), (3) enter email address where it should send converted file and (4)convert it.

Special features;

  • supports all popular video, music, image and document formats. More details
  • provides browser bookmarklet(Firefox, IE) which lets you convert and save files from any webpage.
  • convert and save any video while you are watching it(supports Youtube, GoogleVideo, Myspace, Revver, PutFile, Break.com, Apple, Trailers, Dailymotion, Metacafe, iFilm, Grouper, Blip.tv)
  • file size can’t exceed 100 MB

Media-Convert
media-convert also lets you convert all types of files, i.e. video, music, images, docs and archives. It’s also free and supports almost all conceivable file formats. Procedure is pretty much the same; select file, specify output format and let it do the rest. Once it’s done with a file, it will provide you with a link from where it can be downloaded.

Special features;

  • each converted file remains accessible for 6 more days, so if you want to share it with friends you can forward them a link to download page.
  • input file format auto-detection(no need to specify input format)
  • additional option to adjust conversion settings(like fps, bitrate, codec, audio rate, etc..)
  • download file directly to your mobile via WAP or GPRS.
  • file size can’t exceed 150 MB

Mux
web-based video converter mux lets you convert youtube and googlevideo videos to following formats; mpeg-4, Quicktime, iPod(m4v), flash video, windows media, mpeg-1/2, windows avi, 3gb mobile and OGG Theora. It’s not as powerful as above mentioned zamzar or media-convert however it has some handy features that you won’t find with others(see below).
Special features;

  • for more demanding users there is a power mux which allows users set additional settings on output file(bitrate, fps, file length…etc).
  • there is also a mux mobile which lets you convert web-videos to mobile format(3GP, AMR) and instantly forward them to any mobile for free.

Share/Save/Bookmark