Thanks to antville.org
Tuesday, 11. November 2008
optimize all tables
mysql -e"SELECT CONCAT('OPTIMIZE TABLES ', GROUP_CONCAT(TABLE_SCHEMA, '.', TABLE_NAME ORDER BY TABLE_SCHEMA, TABLE_NAME SEPARATOR ',')) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbname' GROUP BY TABLE_SCHEMA\G
" | awk -F: '{print $2}' | mysql

... Link (0 comments) ... Comment


Saturday, 8. November 2008
Unix cheatsheets
Cheat sheet act as a reference tool which provides cut and paste kind of commands to complete a specific task. I often recommend following set of best cheat sheets to students and IT professionals. It include Linux / UNIX command and shell scripting.

Read more: Top 10 Best Cheat Sheets and Tutorials for Linux / UNIX Commands

... Link (0 comments) ... Comment


Tuesday, 4. November 2008
compress and send
scp is the standard command to copy a folder or files. You can also compress the files before sending it as shown below. In this test I am using a folder with 4 files of 3.5 MB size. The time is reduced to 5 seconds from 40 seconds.

# time scp /root/shantanu/* root@172.29.0.131:/root/
root@172.29.0.131's password:
iostat0111.log 100% 46KB 46.3KB/s 00:00
mystats.txt 100% 201KB 201.5KB/s 00:00
top0111.log 100% 3219KB 100.6KB/s 00:32
vmstat0111.log 100% 21KB 20.7KB/s 00:00

real 0m39.844s
user 0m0.053s
sys 0m0.021s

# time tar zcf - shantanu | ssh 172.29.0.131 "cd /root/shantanu/; tar zpxvf -"
root@172.29.0.131's password:
shantanu/
shantanu/top0111.log
shantanu/mystats.txt
shantanu/vmstat0111.log
shantanu/iostat0111.log

real 0m5.326s
user 0m0.068s
sys 0m0.015s

If you type the full path to the folder /root/shantanu/ then a new folder in the destination folder will be created with the same path.

... Link (0 comments) ... Comment


Thursday, 2. October 2008
Improve the bash history
If you use two bash sessions at the same time, which ever you close second will write over the commands you’ve typed in the first one. That means that your history is lost for one of the sessions. Annoying to say the least. Luckily there is a way to fix this.

Open your .bashrc file as detailed above and add the lines:


shopt -s histappend
PROMPT_COMMAND='history -a'

This will append any new history to the existing file rather than rewriting it, as well as adding to the history every time the prompt is shown. Now, all your history will be saved!

www.bradshawenterprises.com

... Link (0 comments) ... Comment


Thursday, 28. August 2008
base and MySQL connectivity
To get started with the JDBC Driver for MySQL (Connector/J), download it from MySQL's Web site, unpack the downloaded file, and move the resulting mysql-connector-java-x.x.x-bin.jar file into the desired location (e.g. your home directory). In OpenOffice.org, choose Tools -> Options -> Java. Make sure that the appropriate Java Runtime Environment is selected and click the Class Path button. Next, click the Add Archive button and select mysql-connector-java-x.x.x-bin.jar. Click OK to save the settings and close the window, then restart OpenOffice.org.

www.mysql.com

... Link (0 comments) ... Comment


Thursday, 24. July 2008
Linux Screen command
Login to the colleagues machine as a root user and type...
# screen -S foo

Ask him to use -x parameter like...
# screen -x foo

Now both of you are using the same window and see / learn each others' commands.

... Link (0 comments) ... Comment


Thursday, 28. February 2008
Table care!
CHECK TABLE performs an integrity check on the structure and content of your tables. For MyISAM tables, it will also update the index statistics. If problems appear, proceed to ...

REPAIR TABLE is for MyISAM tables only and will correct corrupted tables. InnoDB tables should be dumped with mysqldump and restored.

ANALYZE TABLE updates a table's information about keys for queries so that the data can be found faster and not having to hunt for it. This works for both MyISAM and InnoDB.

OPTIMIZE TABLE defragments MyISAM tables, sorts indexes, and updates the statistics to speed up searches.

... Link (0 comments) ... Comment


my.cnf speed up access
If you are using Linux on your servers and you ssh to the server and then run the mysql client to access the server you can use a .my.cnf file to speed up access.
[client]
user =username
password =x&r%@ldc
host = localhost

Now you can just type ‘mysql’ and it connects you up automatically.

... Link (0 comments) ... Comment


Monday, 18. February 2008
History Searches
Often the command you need is in your history, how do you find it? One simple method is to run the history command and pipe it through grep.

$ history | grep cat
110 cat /tmp/foo

You can then run the command by typing ! and the history line number:

$ !110
cat /tmp/foo

... Link (0 comments) ... Comment


Wednesday, 6. February 2008
manipulating commands using keyboard maps
The inputrc file handles keyboard mapping for specific situations. This file is the startup file used by Readline — the input-related library — used by Bash and most other shells. suppose you want to run a command witha specific keystroke eg : ctl+e to give the out put ls -la
you will need to append the following to the /etc/inputrc file
Control-e: "ls -la\n"
save the file

bind -f /etc/inputrc
--> to the the changes may be relflected

now try to do a control +e and theout put on the screen will be a ls -la

... Link (0 comments) ... Comment


Online for 2292 days
Last modified: 2008.11.11, 17:14
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
December 2008
SunMonTueWedThuFriSat
123456
78910111213
14151617181920
21222324252627
28293031
November
Recent updates
optimize all tables mysql -e"SELECT CONCAT('OPTIMIZE TABLES ', GROUP_CONCAT(TABLE_SCHEMA, '.', TABLE_NAME ORDER BY TABLE_SCHEMA, TABLE_NAME...
by shantanuo (2008.11.11, 17:14)
Unix cheatsheets Cheat sheet act as a reference tool which provides cut and paste kind...
by shantanuo (2008.11.08, 19:30)
compress and send scp is the standard command to copy a folder or files. You...
by shantanuo (2008.11.04, 14:52)
Improve the bash history If you use two bash sessions at the same time, which...
by shantanuo (2008.10.02, 17:39)
base and MySQL connectivity To get started with the JDBC Driver for MySQL (Connector/J), download...
by shantanuo (2008.08.28, 11:03)
Linux Screen command Login to the colleagues machine as a root user and type... #...
by shantanuo (2008.07.24, 13:01)
Table care! CHECK TABLE performs an integrity check on the structure and content of your...
by shantanuo (2008.02.28, 19:37)
my.cnf speed up access If you are using Linux on your servers and you ssh...
by shantanuo (2008.02.28, 18:30)
History Searches Often the command you need is in your history, how do you find...
by shantanuo (2008.02.18, 17:17)
manipulating commands using keyboard maps The inputrc file handles keyboard mapping for specific situations. This...
by shantanuo (2008.02.06, 12:11)
Extensions for students Here are the useful extensions for students. Indic Input Extension 1.0 https://addons.mozilla.org/en-US/firefox/addon/3972...
by shantanuo (2007.12.29, 14:37)
More About Calc 1) Edit - Changes - Record This option helps you to track...
by shantanuo (2007.12.11, 13:42)
Calc Shortcut keys Ctrl + F8 - Highlights cells containing numeric values and formulas (not...
by shantanuo (2007.12.11, 13:40)
Why Open Source? 1) Localized Software 2) Flexibility 3) Supports Old Hardware 4) Performance 5)...
by shantanuo (2007.12.11, 11:14)
Format Zip Code Calc Tip: Format The Zip Code Column For Five Digits Zip Codes...
by shantanuo (2007.12.11, 11:13)
Recover a Deleted Word Document In Word, go to Tools, then Options. Under the File...
by shantanuo (2007.10.22, 09:09)
Saving Filtering Criteria To save filtering criteria, use Custom Views: Step 1: Add the Custom...
by shantanuo (2007.09.27, 20:37)
Returning the Smallest Non-Zero Value I don't remember if I have mentioned this before, but...
by shantanuo (2007.09.23, 17:41)
Another old Excel bug I have noticed an odd thing when it comes to creating...
by shantanuo (2007.09.15, 21:04)
Disable Paste Options Excel include a feature that really annoys some people: Paste Options. When...
by shantanuo (2007.08.16, 08:48)
comic books A way to quickly search for free comic books online using Google if...
by shantanuo (2007.08.12, 17:14)
Finding a line break how to search for a line break (Alt+Enter) in a cell?...
by shantanuo (2007.07.15, 20:02)
Printing a Multi-Line Footer You can create a multi-line header or footer in Excel. The...
by shantanuo (2007.07.09, 22:04)
Picking Up in the Last Document Edited you can jump to the last place that...
by shantanuo (2007.06.09, 10:58)
Gmail Filters Use the wildcard character (*) for companies that use multiple types of address...
by shantanuo (2007.06.06, 11:49)

RSS feed

Made with Antville
Helma Object Publisher