Monday, July 27, 2009

how to rename a table in oracle (sqlplus)

alter table
   table_name
rename to
   new_table_name;

Friday, July 24, 2009

how to change cpan mirror list

$ cpan
cpan) o conf init

This will bring you to reconfigure everything.

Tuesday, July 21, 2009

browsing website anonymously

Bah! Stop searching for an anonymous web browsing service, here is the best one:

HIDE MY ASS

http://www.hidemyass.com

Reliable, fast and etc

Now, you can browse porn sites safely!

HA HA HA

how to set default schema in sqlplus - oracle

SQL> alter session set current_schema=some_schema_name;

Saturday, July 11, 2009

how to mount ntfs file system for read/write in linux

# ntfs-3g /dev/hda1 /mnt/hda1

Friday, July 10, 2009

how to mount macosx partition from linux

# mount -t hfsplus /dev/usb-sda2 /mnt/usb-sda2

But if you can't write into the mounted partition, you might have to disable journaling on this hfs partition by executing this command from your macosx on this drive:

# /usr/sbin/diskutil disableJournal /Volumes/mac-backup

Tuesday, July 7, 2009

Friday, July 3, 2009

how to combine several pdf files into one pdf file

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 01.pdf 02.pdf 03.pdf .......

gs is GhostScript.

Monday, June 29, 2009

what is lost+found/ directory

As was explained earlier during the overview of the FSSTND, Linux should always go through a proper shutdown. Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy filesystem check (the speed of this check is dependent on the type of filesystem that you actually use. ie. ext3 is faster than ext2 because it is a journalled filesystem) using fsck will be done. Fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered. Each partition has its own lost+found directory. If you find files in there, try to move them back to their original location. If you find something like a broken symbolic link to 'file', you have to reinstall the file/s from the corresponding RPM, since your file system got damaged so badly that the files were mutilated beyond recognition. Below is an example of a /lost+found directory. As you can see, the vast majority of files contained here are in actual fact sockets. As for the rest of the other files they were found to be damaged system files and personal files. These files were not able to be recovered.

source: http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html

Multiple Connections using wget?

Noooo!  wget cannot!

You had better use aria2c - The ultra fast download utility

aria2 (its main program is aria2c) is a utility for downloading files. The supported protocols are HTTP(S), FTP, BitTorrent, and Metalink. It has a powerful segmented downloading ability, downloading a file from multiple sources and multiple protocols and utilizing your download bandwidth to the maximum. It supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is uploaded to the BitTorrent swarm. Using Metalink´s chunk checksums, aria2 automatically validates chunks of data while downloading a file like BitTorrent.