Tuesday 11 September 2012

Ubuntu Desktop Edition No More In LiveCD

The ubuntu team has announced that they have dropped the LiveCD option for Ubuntu and now onwards Ubuntu will be available as a single 800MB image that can be used from USB or DVD.

The mailing list reads "For the client, this release now has a consolidated Ubuntu image. There is no longer a traditional CD sized image, DVD or alternate image, but rather a single 800MB Ubuntu image that can be used from USB or DVD. This change does not affect Ubuntu Server, which remains a traditional CD sized image.

That is, starting from Ubuntu 12.10 "Quantal Quetzal", we will have a single 800 MB disk image that can only be used with USB or DVD. The decision does not seem to affect Ubuntu's user base since DVDs and USBs are getting cheaper and LiveUSBs are being popular these days.


Read more...

Monday 3 September 2012

Preventing Accidental Overwriting Of Files In Bash Shell

How many times has this happened to you? It used to happen once in a while with me. A Linux user learns to use the redirection operators such as '>' and '>>' but accidental overwriting starts to become common in commands you use and shell scripts you write.

The accidental overwriting of files that happens unintentionally is known as clobbering and it commonly happens while using the '>' redirection operator.

samar@Techgaun:~$ mycmd > myfile

In the above example, the mycmd clobbers any existing data in the myfile file if that file exists already. Worse things may happen sometime. Imagine accidentally typing

samar@Techgaun:~$ mycmd > /etc/passwd

instead of possibly using other redirection operators (like >> or <). Thankfully, you could recover /etc/passwd from either /etc/passwd- or /var/backups/passwd.bak if you hadn't rm'd these files.

To prevent such accidental overwriting, we can set the noclobber environment variable. Below is a session of enabling this variable:

samar@Techgaun:~/Desktop/test$ echo "www.techgaun.com" > myfile
samar@Techgaun:~/Desktop/test$ echo "Overwriting techgaun.com" > myfile
samar@Techgaun:~/Desktop/test$ set -o noclobber
samar@Techgaun:~/Desktop/test$ echo "Retrying to overwrite" > myfile
-bash: myfile: cannot overwrite existing file

As seen above, you have to turn on the noclobber variable using the set -o noclobber command in your shell. However, you might want to intentionally overwrite contents of certain files even when the noclobber is turned on.

samar@Techgaun:~$ mycmd >| myfile

Notice the >| in place of your normal > redirection operator. Using this operator, you can however overwrite the existing files even if the noclobber is turned on.

If you want to turn off the noclobber variable, type the following:

samar@Techgaun:~$ set +o noclobber

You can also permanently turn on the noclobber by the following command:

samar@Techgaun:~$ echo "set -o noclobber" >> ~/.bashrc

Moreover, such accidental overwriting can be prevented by enabling the interactive mode which is available in most of the linux commands. For example, you can write the alias for many commands that are likely to cause accidental overwriting. See some examples of aliases below:

samar@Techgaun:~$ alias rm=rm -i
samar@Techgaun:~$ alias mv=mv -i

You could even keep these aliases in your ~/.bashrc file permanently. Enabling such interactive modes by default in the commands that are more likely to cause accidental overwriting can prevent clobbering in many cases.

I hope this proves useful to you :)


Read more...

Sunday 2 September 2012

How To Search Manual Pages In Linux

Linux system consists of hundreds of binaries, several syscalls, and other stuffs that do have manual page. What if you want to locate or find the commands by searching through the manual pages? In this post, I am going to talk about one such useful command to search through the manual page names and short descriptions.

The command I am talking about is the apropos command. The best way to learn any linux command is to read its corresponding manual and go through the help (-h or --help) so lets poke through the help of apropos itself.

samar@Techgaun:~$ apropos -h
Usage: apropos [OPTION...] KEYWORD...

  -d, --debug                emit debugging messages
  -v, --verbose              print verbose warning messages
  -e, --exact                search each keyword for exact match
  -r, --regex                interpret each keyword as a regex
  -w, --wildcard             the keyword(s) contain wildcards
  -a, --and                  require all keywords to match
  -l, --long                 do not trim output to terminal width
  -C, --config-file=FILE     use this user configuration file
  -L, --locale=LOCALE        define the locale for this search
  -m, --systems=SYSTEM       use manual pages from other systems
  -M, --manpath=PATH         set search path for manual pages to PATH
  -s, --section=SECTION      search only this section
  -?, --help                 give this help list
      --usage                give a short usage message
  -V, --version              print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

The --regex option is enabled by default.

Report bugs to cjwatson@debian.org.

Particularly, the -e switch is quite useful to filter out your search. See the example below:

samar@Techgaun:~$ apropos -e tar
bf_tar (1)           - shell script to write a tar file of a bogofilter direc...
bf_tar-bdb (1)       - shell script to write a tar file of a bogofilter direc...
git-tar-tree (1)     - Create a tar archive of the files in the named tree ob...
lz (1)               - gunzips and shows a listing of a gzip'd tar'd archive
mxtar (1)            - Wrapper for using GNU tar directly from a floppy disk
ptar (1)             - a tar-like program written in perl
tar (1)              - The GNU version of the tar archiving utility
tar (5)              - format of tape archive files
tgz (1)              - makes a gzip'd tar archive
uz (1)               - gunzips and extracts a gzip'd tar'd archive

Each command has its associated short description and the apropos command searches the short description section of appropriate manual page for the provided keyword. You can also specify the search keywords in the form of regular expression for more flexibility. I hope this command counts as useful one :)


Read more...

Saturday 1 September 2012

Access Linux Filesystems In Windows Using Linux Reader

Earlier today, I had to access my HDD in Windows 7 through USB bridge which I had been using as an internal hard disk for my laptop but unfortunately it didn't. A quick googling revealed a very useful tool by Diskinternals.

Linux Reader is a free software from Diskinternals which excel in building recovery software solutions. Linux reader supports several filesystems used by Linux OS. Below is the list of supported filesystems:

  • Ext2/3/4
  • ReiserFS, Reiser4
  • HFS, HFS+
  • FAT, exFAT
  • NTFS, ReFS
  • UFS2

The program provides for read-only access and does not allow you to make records in file system partitions. This guarantees that the interference in an alterative file system will not affect the work of Linux later. Apart from this, it is necessary to note, that it gives you an opportunity to use common Windows Explorer for extracting data. A preview option for pictures is one more pleasant point, which is worth mentioning. While saving, it ignores file security policies. It means that it is possible to access absolutely any file on a Linux disk from Windows.

More details on Diskinternal's site

Download Linux Reader


Read more...

Thursday 30 August 2012

How To Enable SPDY 3 In Firefox 15

Firefox 15 now supports version 3 of SPDY, an open networking protocol designed to reduce latency of web pages but is not turned on by default. This post will provide the instruction to enable SPDY 3.

Type in address bar, about:config and then search for spdy. Now you will see a particular preference name network.http.spdy.enabled.v3 which is by default set to false.

All you have to do is double click on that preference name to change its value to true. This will enable version 3 of SPDY in your firefox 15.


Note that SPDY v3 will bring support for flow control, update the compression dictionary, and remove wasted space from certain frames, along with other minor bug fixes.

Also, note that the version 3 of SPDY is included for the first time in firefox 15 and might not be fully stable.


Read more...

How To Automatically Start Firefox In Private Browsing Mode

In this post, I will provide the instructions for few of the methods to automatically start firefox in private browsing mode.

Method 1


Go to Edit -> Preferences and then select the Privacy tab. From the History dropdown list, choose the Firefox will Use custom settings for history and then check the Always use the private browsing mode option.


Method 2


The second method involves changing the firefox configuration which can be accessed by typing about:config in the address bar. The first method described above essentially changes one particular preference name browser.privatebrowsing.autostart in background and this second method involves doing that background job manually on our own.


Once you open about:config configuration page, search for private and from the resulting list, modify the boolean value of browser.privatebrowsing.autostart to true by double clicking on it.

I hope this helps. If you got any other method, please drop it as a comment. :)


Read more...

Firefox 15 Released With Support For SPDY 3

The stable firefox 15 has been released yesterday on August 28 with several enhancements and changes on user interface, plugins and performance.

Among the changes, Firefox 15 provides a support for version 3 of SPDY, an open networking protocol developed at google labs with the aim of reducing the latency of web pages. Other notable changes are WebGL enhancements, including compressed textures for better performance and Optimized memory usage for add-ons.

Several other changes have been added to make firefox more superior choice for general users and developers. Few more supports for HTML5 has been also added. You can read the Firefox release notes and complete list of changes.

You can download firefox 15 for your appropriate device from HERE.


Read more...

Ubuntu "Precise Pangolin" 12.04.1 LTS Released

After few months of release of Precise Pangolin, the Canonical and ubuntu developers have finally released the version 12.04.1 of Long Term Support (LTS) of Ubuntu for desktop, server, cloud and core products.

For your information, each new LTS version is released every 2 years. Starting with Ubuntu 12.04 LTS, both desktop and server versions will receive 5 years support. Earlier versions received 3 years support for desktop version and 5 years support for server version.

Among all the changes, the most notable one is the support for Calxeda ECX-1000 SoC family for supporting low-energy hyper-scale data centre servers.

The Ubuntu Cloud Archive also makes its debut - essentially an online software repository from which administrators can download the latest versions of OpenStack for use with the latest long-term support (LTS) release of Ubuntu.

Certified 12.04.1 Ubuntu Cloud images are now available on Amazon Web Services and will soon be posted to Windows Azure as well.

You can follow the detailed Release Announcement and Change Summary for Ubuntu 12.04.1 LTS.

You can download Ubuntu 12.04 LTS from HERE.


Read more...