Which file extension are you
Got this one from a post from lordtasyo's blog . you can visit this link and find out which file extension are you?
« December 2006 | Main | February 2007 »
Got this one from a post from lordtasyo's blog . you can visit this link and find out which file extension are you?
mysqldump - i often use these to copy tables from one server to another since i find the phpmyadmin dump to be very slow and sometimes i get a page timeout. aside from copying a database to another you can also use it to backup your database or all of your databases. a mysql dump file contains sql statements to create databases, populate tables, or populate rows. Most of the time i saved the dump file as a .sql but you could also specify to save it as a .csv or perhaps .xml etc.
When restoring it i use the command \. on the mysql command prompt, i find it much easier that way than typing it on the shell.
i keep on forgetting the syntax to these commands so i better jot them down. These are syntax from the manual and is the most common syntax used in creating a mysql database dump.
shell> mysqldump [options] db_name [tables]
shell> mysqldump [options] --databases db_name1 [db_name2 db_name3...]
shell> mysqldump [options] --all-databases
example in backing up the mysql database:
shell> mysqldump db_name > [backup-file.sql]
dump all databases:
shell> mysqldump --all-databases > all_databases.sql
and restoring it back:
shell> mysql db_name < backup-file.sql
this is what I use:
mysqldump -u [user] -p[pass] [dbname] > [filename.sql]
add it in cron:
#!/bin/sh
date=`date -I`
mysqldump --opt --all-databases | bzip2 -c > /var/backup/backup-$date.sql.bz2
I'm pretty much excited with the upcoming movie Transformers! Been watching this cartoon series since I was in little now its back again. This time in the big screen, yeah! I can't wait to see Optimus Prime in action. I wonder how they will portray Megatron. Cool thing is, I think they'll be featuring Spike, the autobot's homo sapien friend on earth.
But if Spike really is in the movie and he's the decepticon's enemy, he'll pretty much need a revision rhinoplasty in any case he gets hit on the face by one of those big robots. Then again, autobots will save the day and it will be cool to see bumblee saving him. Hurray for the autobots, for more updates please check this site .
Ready, Set, Go !!!
It was indeed an awesome experience with go-karting; you could fell the rush and the excitement combined. it was my first time to drive on a real life high speed machine?, toy? kart? ahh, well just call it Kart. Although, i had my 2 year experience with Need For Speed but its different with the real ones, had some nice drift moves out there. We had 8 laps of hardcore racing, during that time i felt like i was Michael Schumacher, but only with different outfit. Unlike with the other competition, the race was started with a mere GO shout, no sexy ladies waving sign numbers.
Making a tarball and adding a mysqldump to it then naming it as example.tar:
shell> tar cvf example.tar dump.sql
Making a tarball and adding all files in the current directory then naming it as example.tar:
shell> tar cvf example.tar *
Compressing the tarball by zipping it (.gz):
shell> gzip example.tar
Restoring a tarball gzip file example.tar.gz
shell> gunzip example.tar.gz
shell> tar xvf example.tar
Most of the time i do work with the linux shell, so most of the time i will be using ls to display files the current folder. However, in windows the command to display files is dir . i would always interpret cmd as a linux shell.
Back with the good old days, we could use
doskey
to assign shortcuts to
DOS
commands. So, we could just assign
ls
to its windows equivalent like this:
C:\> doskey ls=dir
Now, whenever we type ls , dir command is executed. We could also do that in Windows XP Command prompt, but the problem is after you have closed the window the doskey is also removed as well and we have to type it again every time we would run cmd.
There is actually a work around with that, we could modify our cmd shortcut in the start menu to add the doskey instructions there so that everytime the cmd is loaded the extra line is also executed as well.
i have modified my shortcut target from
%SystemRoot%\system32\cmd.exe
%SystemRoot%\system32\cmd.exe /k doskey ls=dir
the /k makes the window stay after the doskey is executed. For more additional options about cmd you can issue the command
C:\> cmd /?
here are a few common options:
/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K
/Q Turns echo off
/D Disable execution of AutoRun commands from registry
Alternatively, you could also change the value of your registry at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
to
Value name:
AutoRun
Value data:
doskey ls=dir
Actually, its better to use the registry option because after adding the code to the shortcut properties; the code completion for the command prompt no longer works.
This page contains all entries posted to Tildemark blogs in January 2007 . They are listed from oldest to newest.
December 2006 is the previous archive.
February 2007 is the next archive.
Many more can be found on the main index page or by looking through the archives .