Simple Thoughts (Technology) – Newsletter for December 6, 2010

Monday, December 6, 2010

Conman posing as Prince Harry steals from Diana charity

LONDON – A conman posing as Prince Harry on social media website Facebook has diverted donations from a charity the prince had created in memory of his late mother Princess Diana.

The identity theft has cost the prince thousands of pounds intended to help African orphans, reports the Daily Star.

The fraudster is understood to have tricked … Read the original article on Gaea Times at : Conman posing as Prince Harry steals from Diana charity.

Invalid Java 7 API: Attributes.readAttributes()

Update: It appears JDK 7 API has drasctially changed over several iterations. The current javadoc doesn’t contain the mentioned method.

In my over a decade of Java experience, I have never found a fully documented API in Java docs which doesn’t exist even in the latest builds!
Attributes.readAttributes() is a very well documented API:
public static Map<String,?> readAttributes(FileRef??file,
…. Source article on Gaea Times at  : Invalid Java 7 API: Attributes.readAttributes().

How to fully backup hard drive on Linux intelligently without using dd

dd, while an excellent tool to back drive / partition images, copies entire hard drive including unused blocks and even bad blocks (where possible). I have found another way to backup which not only creates an exact duplicate as far as operating system is concerned but also allows you to elongate and extract the remaining … Read the original article on Gaea Times at : How to fully backup hard drive on Linux intelligently without using dd.

How to reduce space required by (Linux utility) dd created drive image

a. Use gzip
An example command:
dd if=/dev/hda1 bs=1k conv=sync,noerror | gzip -c | ssh -c blowfish user@hostname “dd of=filename.gz bs=1k”

Notes:
1. gzip ensures less storage requirement for the image
2. blowfish algorithm is used while transferring the data because it reduces overhead, which leads to faster transfer, for the SSL connection

b. Reduce storage space by zeroing unused blocks
dd …. Original source  : How to reduce space required by (Linux utility) dd created drive image.

How to add a new partition to RAID array in Linux using mdadm

Behold the wonders of mdadm:
mdadm –manage /dev/md1 –add /dev/sdb2
Notes:
1. Replace md1 with the name of the raid array
2. Replace sdb2 with the name of the drive
Read the original article on Gaea Times at : How to add a new partition to RAID array in Linux using mdadm.

How to remove a drive from RAID array in Linux using mdadm

Sometimes a little code is worth a thousand words, no?
mdadm –manage /dev/md1 –remove /dev/sdb2

Notes:
1. Replace md1 with the name of the raid array
2. Replace sdb2 with the name of the drive
Read more »».

Delhi BPO rape case: Fourth accused arrested

NEW DELHI – Delhi Police have arrested the fourth accused from Haryana’s Sohna district in connection with the rape of a 30-year-old call centre employee here last week.

Iqbal, alias ‘Bada Billi’, was apprehended from Fatehpur Beri in Sohna district by a team of Delhi Police, which had gone there in search of him.

Two accused-Shamsad and … Original article on : Delhi BPO rape case: Fourth accused arrested.

How to check symbolic link in Java and why Apache common.io.FileUtils implementation is wrong

Checking for symbolic link (in supported platform) is a long time requirement of Java developers.
Patrick @ onyxbits solved the problem using JNI which is a legitimate approach. However it is platform dependent and consequently you will have to provide precompiled binary for every supported platform.

Apache commons project used an interesting approach in an attempt … Read more >>.

Copyright© 2010 Gaea Times