Keith Kim’s Blog
Technology, Development, Tech Trends, Tech Team Management
9th
DEC
"erl -man io" doesn’t work?
Posted by Keith under Erlang, Tips, Unix/Linux
While I was playing around with erlang, I found my installation of erlang’s man page does not work:
$ erl -man io No manual entry for io
I have compiled and installed (with configure’s prefix option) in /opt/erlang on Solaris 9, put the man page files just in /opt/erlang/man. Clearly this doesn’t work. So I did some tracking with:
$ truss -o /tmp/output.txt erl -man io
(truss is like strace for Solaris; "strace" on Solaris is completely different thing.)
And found that the "/man" directory should live in /opt/erlang/lib/erlang/man.
"erl -man io" works now. It’s in MANPATH and Windex is created — so just "man io" would work just fine, but I just wanted to fix it anyway.
8th
DEC
Windows remote task list
Posted by Keith under Tips, Windows
Just a note for myself. I had to list processes of an XP box, remotely from Vista. This can be done by issuing following command:
tasklist.exe /s [computer name] /u [user name] /p [password]
At first try, I got an error message, “ERROR: Logon failure: unknown user name or bad password.” I had to change network securtiy on XP machine:
Administrative Tools -> Local Security Settings -> Local Policies -> Security Options -> Network Access:Sharing and security model for local accounts”. Set this to “Classic - local users and authenticate as themselves”.
6th
NOV
Posting source code in Wordpress
Posted by Keith under Tips
http://faq.wordpress.com/2007/09/03/how-do-i-post-source-code/
[sourcecode language=’css’]
[ sourcecode language=’css’ ] .. [ /sourcecode ]
language= cpp, csharp, css, delphi, html, java, jscript, php, python, ruby, sql, vb, xml
[/sourcecode]
2nd
SEP
Editing large text files
Posted by Keith under Tips
Ok, straight to the point: there is NO editor that can handle huge text file, size of giga bytes. I have this SQL file, 10+ GB, and no editor can handle it.
One commercial software I found is: http://www.textmaster.ca/
It claims it can handle 300GB file. It’s nice, but I don’t do this too often, so sorry, I don’t want to purchase one. One easy way to go around the problem is, of course, splitting the file into multiple files and edit each, and later join the files together.
Split:
[sourcecode language=’css’]
split -b 50m example.sql example_
[/sourcecode]
Join:
[sourcecode language=’css’]
cat example_[aa-bb] > example.sql
[/sourcecode]
This will do.
2nd
Back up using DOS batch
Posted by Keith under Tips
Almost always I make backups of important files, but I still lose up-to-date files. So automating/scheduling backup is needed.
I do:
- Files are backed up continously using Mozy.
- Image of C drive is created daily onto another HDD.
- Some important files are backed up using SyncBack to another computer.
- For MySQL, I use MySQL Administrator to schedule back up.
Fo sync back, it is easier if a directory is ZIPed up. So here is a simple batch file:
[sourcecode language=’css’]
@echo off
REM =============
REM back up daily
REM Run by WinXP scheduler
REM =============
REM === Get current date
FOR /F “TOKENS=1* DELIMS= ” %%A IN (’DATE/T’) DO SET CDATE=%%B
FOR /F “TOKENS=1,2 eol=/ DELIMS=/ ” %%A IN (’DATE/T’) DO SET mm=%%B
FOR /F “TOKENS=1,2 DELIMS=/ eol=/” %%A IN (’echo %CDATE%’) DO SET dd=%%B
FOR /F “TOKENS=2,3 DELIMS=/ ” %%A IN (’echo %CDATE%’) DO SET yyyy=%%B
SET date=%yyyy%%mm%%dd%
REM KK-20080829: backing up Palm
zip -r “C:\BACKUP\palm\kkim_%date%.zip” “C:\Program Files\palmOne\kkim”
[/sourcecode]
I got this “date” batch script from the net. Sorry, don’t remember where I got it. This works very well, and kudos to who wrote it.
I have cygwin installed and c:\cygwin\bin is in my PATH, thus the ‘zip’ executable is used in the batch file. And Windows scheduler is used here. And, SyncBack will pick up the file and put it onto another computer. Or, the ZIP file can be created on another HDD.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
Recent Posts
- Using SVN in Mac
- Setting up CVS pserver on OSX 10.4 and up (10.5, 10.6)
- PhoneGap: development apps for iPad
- PhoneGap install
- iPhone and iPad development
Recent Comments
- Pranav on Intro: Java ME and Palm
- Keith on Code Review tools
- Jesse Gibbs on Code Review tools
- pdumsproject on MS Project replacement (Desktop apps)
- sparky on EverNote, better than Microsoft OneNote
Categories
- Apple
- Architecture
- Books
- Clojure
- Cool Apps
- Development Tools
- Erlang
- Fun
- Golang
- iPhone iPad development
- J2EE
- J2ME
- Java
- Lisp
- Management
- PDA
- Sites
- Tips
- Unix/Linux
- Windows
Archives
- July 2010
- June 2010
- January 2010
- December 2009
- November 2009
- July 2009
- May 2009
- January 2009
- December 2008
- November 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- April 2007