2011年12月28日 星期三

Useful Alias

alias 454FLX='ssh adminrig@172.16.7.253'
alias dumd='du -h --max-depth=1 | sort -k2'

2011年12月21日 星期三

Java parameter

-xmx maxmimum heap size
-xms minimum heap size


From 2011_12_22 core-meeting report

2011年11月27日 星期日

Sort

Multiple Sort usethe

sort -k filed1,field1 -k filed2.field2(g)

becareful,
sort -k 14,14 -k 16,16g R_CPU1_Q_CPU8.blat | less

兩個相同, 代表只用相同 key, 而不是 key 後的content

link

ln -s


-s soft_link, when there are cross-device

2011年11月23日 星期三

Copy Remote File

# Copy file
scp Andy@192.168.200.40:/dir

# Copy Directory
scp -r foo your_username@remotehost.edu:/some/remote/directory/bar


#Reference
http://www.hypexr.org/linux_scp_help.php

2011年10月14日 星期五

KDE-Konqueror

1. In setting the konqueror
we can use sftp to connection to another pc,
it is conviencer than ftp or other protocol.


///////////////////////////////////////////////
SSH File Transfer Protocol
From Wikipedia, the free encyclopedia
Jump to: navigation, search

In computing, the SSH File Transfer Protocol (also Secret File Transfer Protocol, Secure FTP, or SFTP) is a network protocol that provides file access, file transfer, and file management functionality over any reliable data stream. It was designed by the Internet Engineering Task Force (IETF) as an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capability, but is also intended to be usable with other protocols. The IETF of the Internet Draft states that even though this protocol is described in the context of the SSH-2 protocol, it could be used in a number of different applications, such as secure file transfer over Transport Layer Security (TLS) and transfer of management information in VPN applications.

This protocol assumes that it is run over a secure channel, such as SSH, that the server has already authenticated the client, and that the identity of the client user is available to the protocol.

///////////////////////////////////////////////////
Konqueror is one of the most advanced file managers for KDE. Thanks to the underlying KDE technologies it can transparently access FTP and SFTP servers, zip files (and other archives), smb (Windows) shares, and even browse and rip audio CDs.

///////////////////////
Reference
http://www.konqueror.org/faq/#HowdoIaddbookmarkstothebookmarktoolbar

2011年8月5日 星期五

NFS

1 We can mount the remote dir to local by nfs
server:
modify /etc/exports
{{{
/home/Andy 192.168.200.40(rw)

}}}

client
{{{
mount -t nfs 192.168.200.40:/home/Andy /mnt/nfs
}}}

Modify the UID, because the server and client passwd will look same uid
local
{{{
usrmod -u 504 Andy
}}}


Reference:
http://blog.csdn.net/ylyuanlu/article/details/6004818
http://linux.vbird.org/linux_server/0330nfs.php#What_NFS_perm

2011年8月3日 星期三

Screen

1. New a windown in vertical
{{
screen
# new a screen in bottom
contral + a
shift +s
# Move to below
controal + tab
# new a scrren
contral + a -> c

}}}


Reference:
http://go-linux.blogspot.com/search?q=screen
http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/

2011年8月1日 星期一

Off PC

1. shutdown

2. poweroff

2011年7月14日 星期四

Compress and InCompress

tar
1. Compress a file using
{{{
tar -czv -f /tmp/454_2_6.tar.gz doc/*
}}}

2. Incompress
{{{
tar -xzf xxx.tar.gz
}}}

2011年6月20日 星期一

System execute

1. using `` symbol
2. using system function

Case 1: grep need the escape in search
{{{
#!/usr/bin/perl

use strict;
use warnings;

my $r = `grep "\\w" FGSH_TIR.gff.GOA.overlap.entries.Annotation_2`;
#my $r = `echo hello`;
print $r;


system ("cat FGSH_TIR.gff.GOA.overlap.entries.Annotation_2 | grep"."\'\\w\'"."> tt");

}}}

2011年5月25日 星期三

Element article

1. http://www.uic.edu/depts/accc/software/unixgeneral/email101.html

2. vi http://vimregex.com/
http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml

3.

2011年5月18日 星期三

Show Method and Member and enum

Show method
http://www.java2s.com/Code/Java/Reflection/ClassReflectionshowmethods.htm

#############################################################
show enum
Reference: http://download.oracle.com/javase/1,5.0/docs/guide/language/enums.html

for (Rank rank : Rank.values())
protoDeck.add(new Card(rank, suit))

2011年4月13日 星期三

MPI

1. Library problem
http://linuxtoolkit.blogspot.com/2009/09/openmpi-centos-linking-error-libmpiso0.html

2011年2月16日 星期三

Sensitivity and specificity

http://en.wikipedia.org/wiki/Sensitivity_and_specificity

2011年2月15日 星期二

Download

1. Download ftp data
wget ftp://user:password@ftp.individual.com.tw:6667/

Reference:
http://redhat.ecenter.idv.tw/bbs/showthread.php?threadid=39222

2. More detail
wget -m ftp://user:password@share.ngc.sinica.edu.tw/dir_name/*

-m mean depth

Reference
http://emboss.sourceforge.net/docs/adminguide/node11.html
http://blogs.sitepoint.com/using-wget/