Sunday, December 13, 2009

Script for Finding Size of All Folders in Linux

Some users will eat lot of space in the system by storing unwanted files. This bash script will help you find which folder using more space.

Open a terminal
Then cut & Paste the script


for f in * ; do if [ -d "$f" ]; then du -sh "$f" ; fi done | sort -n

Friday, December 11, 2009

How to Change Sudo Password Remembering Time in Ubuntu

When You use 'sudo' command it will ask for password in First time and will remember password for 15 minutes. It is a security hole for sensitive systems.
You can change sudo Password Remembering Time in Ubuntu .

Open a terminal and type
$ sudo visudo

In Ubuntu, visudo uses nano text editor, and what it does is edit the / etc / sudoers.tmp

Check for the line as shown below


Defaults        env_reset


Change it to

Defaults        env_reset , timestamp_timeout = X

Where X is the time that we remember the sudo password, if we put 0 (zero) that we always get the request.

Finally to save the changes, press Ctrl + X and said yes.

Sunday, December 6, 2009

How to Recover Ubuntu after a Partial Upgrade

If your Ubuntu machine is nor working properly after a partial upgrade and have a have broken the system dependencies tree, You can recover it by using a  simple command that reinstalls all the installed packages and reconfigures them automatically.This will take a long time to complete.

$sudo dpkg-reconfigure -phigh -a

You can try the following command first

$ sudo apt-get install -f

Saturday, December 5, 2009

How to setup Google Public DNS in Ubuntu 9.10 Karmic Koala

DNS (Domain Name Server) is basically a system to convert domain names into IP addresses. Domain names are easier to understand, memorize and write for humans while computers only use IP addresses to communicate.

In most of the  case, Internet Service Providers  providing the DNS servers to the customer. User can change it, the  reasons to switch to other DNS servers for performance, privacy and censorship. Most of the people using OpenDNS as the first alternative, But Now Google Public DNS is available and the performance is much better.

Now How to set up Google Public DNS in Ubuntu

Select System-->Preferences-->Network Connections


Select  the type of connection you have. For this example, we will use ‘Wired’.
Under ‘Wired’, highlight ‘Auto etho’ and click on ‘Edit’.

Now,  Inside 'Editing Auto etho' window, click on ‘IPv4 Settings’ tab. and select 'Automatic (DHCP) address only'



Put these nameserver addresses as your ‘DNS Servers’:8.8.8.8, 8.8.4.4

Click ‘OK’ and reboot your machine.

NOTE:

For avoiding  your settings get revoked after reboots, you may need to make the following changes via the command line:
$ sudo cp /etc/resolv.conf /etc/resolv.conf.auto
$ gksudo gedit /etc/dhcp3/dhclient.conf
# append the following line to the document
prepend domain-name-servers 8.8.8.8, 8.8.4.4;
# save and exit
$ sudo ifdown eth0 && sudo ifup eth0

Small Usb Keyboard for Gmail users - Gboard


Gboard is a small simple device for help gmail users. It is a USB device. The Gboard has 19 buttons and each corresponds with a task in Gmail. From the board, you can search, go to results, go to starred mail, compose a message, reply, reply to all, forward a message, star and archive messages, delete and mark messages as spam, flip through your messages , select messages and go right to the inbox.

Thursday, December 3, 2009

Arrange Your Desktop windows with X-tile in Ubuntu / Debian


X-tile is a useful gnome applet for your panel (or optionally a standalone application) that allows you to select a number of open windows and tile them in different ways. This is especially useful for comparing products in separate web pages,or for programmers refering to documentation as they are programming.
now double-click on deb file and install with gdebi installer.

or open a terminal and use sudo dpkg -i filename.deb
X-tail can be run by selecting
Applications-->accessories-->x-tile

Wednesday, December 2, 2009

Download youtube video in ubuntu / Debian using UTube Ripper


Utube Ripper is an application written in Gambas that works exclusively on Linux. It's useful to download and convert Youtube videos in a simple and efficient way. You can also  convert them into a non-flash format. You can use the "Rip audio only" option to extract audio from a YouTube video and can convert  into an MP3 format.


Download .deb file from here

now double-click on deb file and install with gdebi installer.


or open a terminal and use sudo dpkg -i filename.deb