Milinda Pathirage’s Blog

Let the code talk for yourself!

Entries Tagged as 'linux tips'

Deadly Linux Commands

November 21st, 2008 · No Comments · linux tips, news

If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system.

Read more….
Sphere: Related Content

[Read more →]

Tags:

Linux Directory to an ISO

November 14th, 2008 · No Comments · linux, linux tips

If you want to backup any of your directories in Linux file system, you can use following command. Replace LABEL and directory to suit your needs.
mkisofs -V LABEL -r directory | gzip > cdrom.iso.gz

In Ubuntu 8.04 mkisofs command is just a symbolic link to genisoimage, the fork of mkisofs. It provides a mkisofs symlink to [...]

[Read more →]

Tags:

PulseAudio Flooding LAN with Multicast Packets

November 14th, 2008 · No Comments · linux, linux tips

If you enable Multicast/RTP Sender and set the option ’send audio from local speakers’ in above PulseAudio configuration window, it will flood the network with multicast packets when you play music in your computer. This problem has mentioned in this thread in ubuntuforums.org. Yesterday this has happened to me and it took 3 hours to [...]

[Read more →]

Tags:

inotify - Linux File System Activity Monitoring

November 10th, 2008 · No Comments · c programming, linux, linux tips, php, programming, python, ruby

inotify is a Linux kernel subsystem which monitors Linux file system operations, such as read, write, create and delete. It was included in the mainline kernel from release 2.6.13 (June 18, 2005). It is more efficient than busy polling from a corn job and it’s an extensions to Linux file system to capture the file [...]

[Read more →]

Tags:

How to Fix NTFS Mount Error on Ubuntu

November 4th, 2008 · 3 Comments · linux tips, ubuntu

Sometimes when you plug your external hard drives formatted using NTFS into Ubuntu, system gives following error:

Most of the times cause for this error is, unplugging the drive directly from Windows without going through ‘Safely Remove Hardware’ option. When you directly remove the hard drive from the Windows, it will not mark NTFS log as [...]

[Read more →]

Tags:

apt and dpkg beyond the basic use of installing programs

October 7th, 2008 · No Comments · linux, linux tips

When I start to reading Ubuntu packaging guide, I found this interesting things which can do using apt and dpkg.
apt-cache dump: lists every package in the cache. This command is especially helpful in combination with a grep pipe such as apt-cache dump | grep foo to search for packages whose names or dependencies include foo.
apt-cache [...]

[Read more →]

Tags:

Ubuntu 8.04 Bug - After Playing Flash Videos in Firefox 3, No Sound in other Media Players

August 29th, 2008 · No Comments · linux tips, ubuntu

I came a cross this problem everyday when I watch some Flash Videos using Firefox 3 browser. After I watched flvs using Firefox 3, no other media player in Ubuntu giving any audio out. Most cases I can play the video without sound using most media players, but I think mplayer crashes when try to [...]

[Read more →]

Tags:

sudo !!(”bang bang”)

July 30th, 2008 · 1 Comment · linux tips

While reading lifehacker I found this nice command. When you excute commands that need superuser previlages in operating systems like Ubuntu, it gives you permission denied message. If you want to excute that command while in the normal user mode you have to use ’sudo’. But if we don’t have something like ’sudo !!’ we [...]

[Read more →]

Tags:

GCC 4.3 changes caused build break when use -Wall and -Werror together

May 23rd, 2008 · 1 Comment · c programming, linux tips

As they have mentioned in this document, there can be errors in code that work well with previous versions of GCC. They have mentioned that, new warnings may exist for previously warning-free code that uses -Wuninitialized, -Wstrict-aliasing,-Wunused-function, -Wunused-variable (-Wall subsumes many of these warning flags). And when we use -Wall in conjuction with -Werror it [...]

[Read more →]

Tags:

Fixing “macro `AM_GCONF_SOURCE_2′ not found in library” in Ubuntu

May 22nd, 2008 · 2 Comments · linux tips

When I tried to install wallpaperzapper in Ubuntu from the source, I got error macro ‘AM_GCONF_SOURCE_2′ not found in library. This link contain detailed description about this macro and for what purposes we can use it our configuration scripts.

This macro encapsulates all GConf related stuff and can used to determine the directory where .schemas files [...]

[Read more →]

Tags: