Search This Blog

Monday, December 29, 2008

Use of "find" command in Linux

http://www.cyberciti.biz/tips/linux-findinglocating-files-with-find-command-part-2.html

In the first part we talked about find command basic usage.

Now let us see how to use find command
(a) To gain lots of useful information about users and their files

(b) Monitor and enhance the security of system using find command

Finding all set user id files

setuid ("suid") and setgid are access right flags that can be assigned to files and directories on a Unix based operating system. They are mostly used to allow users on a computer system to execute binary executables with temporarily elevated privileges in order to perform a specific task.
# find / -perm +u=s
OR
# find / -perm +4000

See also, shell script to find all programs and scripts with setuid set on.

Finding all set group id files

# find / -perm +g=s
OR
# find / -perm +2000

See also, shell script to find all programs and scripts with setgid bit set on.

Finding all large directories

To find all directories taking 50k (kilobytes) blocks of space. This is useful to find out which directories on system taking lot of space.
# find / -type d -size +50k
Output:

/var/lib/dpkg/info
/var/log/ksymoops
/usr/share/doc/HOWTO/en-html
/usr/share/man/man3

Finding all large files on a Linux / UNIX

# find / -type f -size +20000k
Output:

var/log/kern.log
/sys/devices/pci0000:00/0000:00:02.0/resource0
/sys/devices/pci0000:00/0000:00:00.0/resource0
/opt/03Jun05/firefox-1.0.4-source.tar.bz2

However my favorite hack to above command is as follows:
# find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

/var/log/kern.log: 22M
/sys/devices/pci0000:00/0000:00:02.0/resource0: 128M
/sys/devices/pci0000:00/0000:00:00.0/resource0: 256M
/opt/03Jun05/firefox-1.0.4-source.tar.bz2: 32M

Above command will find all files block size greater than 20000k and print filename followed by the file size. Output is more informative as compare to normal find command output :D

Friday, December 19, 2008

Short LaTex Math Guide

A short LaTex Math Guide can be found here.

Click the link to download a pdf file.

Thursday, December 18, 2008

Archive command summary (ar)

How to use "ar" command to generate library is here.

Some examples are:
  1. To create a library, enter:

    ar -v -q lib.a strlen.o strcpy.o

    If the lib.a library does not exist, this command creates it and enters into it copies of the files strlen.o and strcpy.o. If the lib.a library does exist, then this command adds the new members to the end without checking for duplicate members. The v flag sets verbose mode, in which the ar command displays progress reports as it proceeds.

  2. To list the table of contents of a library, enter:

    ar -v -t lib.a

    This command lists the table of contents of the lib.a library, displaying a long listing similar to the output of the ls -l command. To list only the member file names, omit the -v flag.

  3. To replace or add new members to a library, enter:

    ar -v -r lib.a strlen.o strcat.o

    This command replaces the members strlen.o and strcat.o. If lib.a was created as shown in example 1, then the strlen.o member is replaced. A member named strcat.o does not already exist, so it is added to the end of the library.

  4. To specify where to insert a new member, enter:

    ar -v -r -b strlen.o lib.a strcmp.o

    This command adds the strcmp.o file, placing the new member before the strlen.o member.

  5. To update a member if it has been changed, enter:

    ar -v -r -u lib.a strcpy.o

    This command replaces the existing strcpy.o member, but only if the file strcpy.o has been modified since it was last added to the library.

  6. To change the order of the library members, enter:

    ar -v -m -a strcmp.o lib.a strcat.o strcpy.o

    This command moves the members strcat.o and strcpy.o to positions immediately after the strcmp.o member. The relative order of the strcat.o and strcpy.o members is preserved. In other words, if the strcpy.o member preceded the strcat.o member before the move, it still does.

  7. To extract library members, enter:

    ar -v -x lib.a strcat.o strcpy.o

    This command copies the members strcat.o and strcpy.o into individual files named strcat.o and strcpy.o, respectively.

  8. To extract and rename a member, enter:

    ar -p lib.a strcpy.o >stringcopy.o

    This command copies the member strcpy.o to a file named stringcopy.o.

  9. To delete a member, enter:

    ar -v -d lib.a strlen.o

    This command deletes the member strlen.o from the lib.a library.

  10. To create an archive library from multiple shared modules created with the ld command, enter:

    ar -r -v libshr.a shrsub.o shrsub2.o shrsub3.o ...

    This command creates an archive library named libshr.a from the shared modules named shrsub.o, shrsub2.o, shrsub3.o, and so on. To compile and link the main program using the libshr.a archive library, use the following command:

    cc -o main main.c -L/u/sharedlib -lshr

    The main program is now executable. Any symbols referenced by the main program that are contained by the libshr.a archive library have been marked for deferred resolution. The -l flag specifies that the libshr.a library be searched for the symbols.

  11. To list the contents of lib.a, ignoring any 32-bit object file, enter:

    ar -X64 -t -v lib.a
  12. To extract all 32-bit object files from lib.a, enter:

    ar -X32 -x lib.a
  13. To list all files in lib.a, whether 32-bit, 64-bit, or non-objects, enter:

    ar -X32_64 -t -v lib.a

Monday, December 15, 2008

LSF user's quick reference guide

LSF User's Quick Reference can be found here.

Thanks.

Wednesday, December 10, 2008

Intel Compiler Options

Options -ip (Linux and Mac OS X) and /Qip (Windows) enable additional interprocedural optimizations  for  single-file compilation.

Option -fma enables the combining  of  floating-point  multiplies  and add/subtract operations. However, if you specify -mp  (Linux)  or -fp-model  strict  (Linux)  but do not explicitly specify -fma, the default  is -no-fma.


Environment Variables for Intel Compilers

export CC=icc
export CFLAGS='-O3 -mp -ip'
export CXX=icpc
export CXXFLAGS='-O3 -mp -ip'
export F77=ifort
export FFLAGS='-O3 -mp -ip'

Thursday, December 4, 2008

Ubuntu


Minimum X11 installation for Ubuntu server:  apt-get install xdm xfce4

Set Up Ubuntu-Server 6.10 As A Firewall/Gateway For Your Small Business Environment
Page: 1, 2, 3, 4, 5, 6, 7, and 8

How to install firefox in Ubuntu: sudo apt-get install firefox

Tuesday, December 2, 2008

Happy Face in LaTex

$\ddot\smile$

Try!

Thursday, November 20, 2008

How to setup remote subversion server through ssh

This site provides an excellent tutorial.


Mounting remote file system using SSH

Using svn with iDisk is very disappointing although I am a real Mac fan. However, this solution of using sshfs (Secure Shell File System) give me a new solution of setting up SVN server.

Cheers!


SVN works perfect in Mac

See this site:


changing paper size in LaTex

Sometimes a certain specific class file does not support options of paper size.  Default is usually A4.  The following line in the very front of your LaTex file, just below, will allow you to generate letter-sized pdf file as an outcome.

\usepackage[letterpaper]{geometry}

ssh session alive

It is very frequently happening that a terminal with ssh session dies after a certain period of time by any reason.  It looks like a server setting should be modified, which cannot be done by an end-user.  But, there is one thing can be done by each user.

1. Go to your .ssh directory:
      cd ~/.ssh

2. Check whether you have "config" file.  Anyway, open/create it: 
      vi config

3. Put the following line in the file:
      KeepAlive yes



Bibtex capital letters

Edit your bibtex file and use {} for words that you want to keep the style.

@article{greenwade93,        
   author  = "George D. Greenwade",        
   title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",        
   year    = "1993",        
   journal = "TUGBoat",        
   volume  = "14",     
   number  = "3",     
   pages   = "342--351" 
}

source: http://www.andy-roberts.net/misc/latex/latextutorial3.html

Tuesday, November 18, 2008

The underscore symbol between C and FORTRAN

When a C function is called from FORTRAN routine, the C function should end with '_'.  In other words, a C function 'myfun_' should be called as 'myfun' in a FORTRAN code.  Actually this is an old paradigm between GNU C and FORTRAN compilers. Current GNU FORTRAN compiler, gfortran, does not follow this rule, and so does Intel compilers.   This is actually a serious problem in compiling BLACS and SCALAPACK libraries.

In compiling BLACS, Bmake.inc file should have an option:

INTFACE = -DAdd_

and in compiling SCALAPACK, SLmake.inc should have:

CDEFS     = -DAdd_

This option depends on compliers.



BLACS 64bit compiling

It is theoretically impossible to compile BLACS to make it work in 64 bit computing environment.  BLACS package downloadable from www.netlib.org works only on 32 bit OSs. Otherwise, all the libraries including BLAS, LAPACK, and SCALAPACK should be recomiled with 32 bit option.  A possible way to go around this bottleneck is to use Intel MKL library, specifically,

   -lmkl_blacs_openmpi_lp64 

The latest version of openmpi-1.2.8 works well with Intel-BLACS and scalapack compiled using Intel FORTRAN compiler, ifort.


Private network setup guide




Sunday, November 16, 2008

Compile openmpi-1.2.8 using Intel Compilers


./configure --prefix=/opt/openmpi-1.2.8/intel   CC=icc   CXX=icpc   F77=ifort   FC=ifort

Saturday, November 15, 2008

Lapack compile script to save messages

./xlintstd <> dtest.out 2>&1

Friday, November 14, 2008

Kerberos configuration file

When I install Kerberos to connect MHPCC machine, krb5 configuration needs to be edited. The location of krb5.conf is by default /usr/local/krb5. However, I got an error message like:

kinit(v5): Configuration file does not specify default realm when parsing name ........

This error has been resolved by copying
/usr/local/krb5/krb5.conf
to
/etc/krb5.conf

or
/etc/kerberosV/krb5.conf


Symbolic link did not work.

Tuesday, November 4, 2008

Not to show URLs in LaTex generated papers

When I prepare a manuscript using LaTex with Elsevier package, two reference styles are provided, elsart-num.bst and elsart-harv.bst, which generate reference lists ordered by citation number and author's name, respectively.  It often shows long URLs, which is absolutely not necessary for any purposes. 

Not to show URLs in my final manuscript, I did as follows:

1. Open .bst file.
2. Search "write.url" and replace it by "% write.url" within
  • FUNCTION {article}
  • FUNCTION {book}
  • FUNCTION {booklet}
  • FUNCTION {inbook}
  • FUNCTION {incollection}
  • FUNCTION {inproceedings}
  • FUNCTION {manual}
  • FUNCTION {masterthesis}
  • FUNCTION {misc}
  • FUNCTION {phdthesis}
  • FUNCTION {proceedings}
  • FUNCTION {techreport}
  • FUNCTION {unpublished}
But, do not make any changes where "write.url" is defined in FUNCTION {write.url}.

3. Another way is to redefine FUNCTION {write.url}, but I did not figure out how to yet.




Add a user in a sudoer list

In most Unix/Linux system, the suoder file is /etc/sudoers.

1. Login as a normal user.
2. Type/enter "su" followed by a root password.
3. Open /etc/sudoers using vi or any editor and include a line

freeman ALL=(ALL) ALL

which will provide all the administration authority of the system to the user, "freeman".



Saturday, September 20, 2008

How to setup xhost file

  1. Create or edit the file "/etc/Xn.hosts" where 'n' is the display number of the server on the local host, normally 0, as in "/etc/X0.hosts".

    To deny all X access to your system, the file /etc/X0.hosts will contain a single character, "-".

    To grant access to hosts "host1.com" and "host2.com" and no other hosts the file /etc/X0.hosts will consist of:

    -
    +host1.com
    +host2.com
  2. Search through all files in the directory /usr/lib/X11/xdm for occurances of the command "xhost +" or "/usr/bin/X11/xhost +". Remove or comment out all such lines.
  3. Inform users that any xhost commands should be removed or commented out of user startup scripts, such as .cshrc, .login, .profile, etc.

Source: http://www.pseriestech.org/forum/rs6000/configure-xhost-files-109.html

Friday, September 19, 2008

Manual configuration of DNS in Ubuntu

(1) Open /etc/resolv.conf file:
vi /etc/resolv.conf

(2) Add your ISP nameserver as follows:

search isp.com
nameserver 202.30.38.101
nameserver 163.180.16.53.1

Note Max. three nameserver can be used/defined at a time.

Friday, September 12, 2008

How to make landscape documents or pages using LaTex

http://texblog.wordpress.com/2007/11/10/landscape-in-latex/

Adjusting space between items

\begin{itemize}\setlength{\itemsep}{-2mm}
\item
\end{itemize}

Friday, September 5, 2008

Inline figure in LaTex

\usepackage{wrapfig }

\begin{wrapfigure}{r}{0.4\textwidth}
\centering
\includegraphics[width=0.4\textwidth]{leadfield.eps}
\caption{Text wrap around figure}
\noindent
%\hrulefill
\label{test}
\end{wrapfigure}

Thursday, September 4, 2008

Highest Impact Factor Journals in the category of Environmental Engineering

Mark Rank Abbreviated Journal Title
(linked to journal information)
ISSN Total Cites Impact
Factor
Immediacy
Index
Articles Cited
Half-life
1 APPL CATAL B-ENVIRON 0926-3373 10376 4.651 0.666 356 4.9
2 ENVIRON SCI TECHNOL 0013-936X 51326 4.363 0.615 1202 6.2
3 WATER RES 0043-1354 23992 3.427 0.353 485 6.9
4 INDOOR AIR 0905-6947 1272 2.887 0.524 42 4.7
5 J HAZARD MATER 0304-3894 6521 2.337 0.277 1039 3.6
6 ECOL ENG 0925-8574 1786 2.175 0.384 112 5.8
7 ENVIRON MODELL SOFTW 1364-8152 1748 2.099 0.976 165 3.4
8 INT J LIFE CYCLE ASS 0948-3349 772 1.607 0.712 66 4.6
9 J AIR WASTE MANAGE 1047-3289 3197 1.523 0.200 135 7.3
10 OZONE-SCI ENG 0191-9512 784 1.515 0.109 55 8.1

Highest Impact Factor Journals in the category of Fluid & Plasma Physics

Mark Rank Abbreviated Journal Title
(linked to journal information)
ISSN Total Cites Impact
Factor
Immediacy
Index
Articles Cited
Half-life
1 ANNU REV FLUID MECH 0066-4189 4329 9.471 2.471 17 >10.0
2 NUCL FUSION 0029-5515 6687 3.278 0.731 234 6.5
3 PLASMA PHYS CONTR F 0741-3335 5479 3.070 0.346 234 5.4
4 PHYS REV E 1539-3755 57936 2.483 0.504 2255 5.6
5 PHYS PLASMAS 1070-664X 14648 2.325 0.534 794 5.3
6 MICROFLUID NANOFLUID 1613-4982 299 2.241 0.586 70 2.2
7 PLASMA PROCESS POLYM 1612-8850 441 2.132 0.494 83 2.3
8 PLASMA SOURCES SCI T 0963-0252 2429 2.120 0.522 113 6.1
9 J FLUID MECH 0022-1120 27263 2.026 0.413 501 >10.0
10 PHYS FLUIDS 1070-6631 15514 1.780 0.217 567 >10.0

Highest Impact Factor Journals in the category of Applied Physics

Mark Rank Abbreviated Journal Title
(linked to journal information)
ISSN Total Cites Impact
Factor
Immediacy
Index
Articles Cited
Half-life
1 NAT MATER 1476-1122 13606 19.782 5.278 133 3.2
2 MAT SCI ENG R 0927-796X 3114 14.400 0.167 6 6.2
3 ADV FUNCT MATER 1616-301X 8320 7.496 0.683 461 2.9
4 SMALL 1613-6810 2696 6.408 1.033 272 2.0
5 MRS BULL 0883-7694 3836 5.168 1.468 79 6.0
6 LASER PART BEAMS 0263-0346 1422 4.696 1.278 72 2.8
7 ORG ELECTRON 1566-1199 924 3.879 0.386 101 3.1
8 APPL PHYS LETT 0003-6951 157868 3.596 0.627 5818 5.4
9 PROG ELECTROMAGN RES 1559-8985 1433 3.320 0.739 249 1.9
10 NANOTECHNOLOGY 0957-4484 10839 3.310 0.461 1259 2.7

Highest Impact Factor Journals in the category of Chemical Engineering

Mark Rank Abbreviated Journal Title
(linked to journal information)
ISSN Total Cites Impact
Factor
Immediacy
Index
Articles Cited
Half-life
1 PROG ENERG COMBUST 0360-1285 1983 5.269 1.250 16 9.6
2 J CATAL 0021-9517 27254 4.737 0.800 330 8.4
3 APPL CATAL B-ENVIRON 0926-3373 10376 4.651 0.666 356 4.9
4 DYES PIGMENTS 0143-7208 3024 2.796 0.501 349 4.6
5 CATAL TODAY 0920-5861 15484 2.764 0.490 502 6.3
6 P COMBUST INST 1540-7489 4714 2.647 0.593 383 7.8
7 J MEMBRANE SCI 0376-7388 15786 2.432 0.346 537 6.6
8 PROCESS BIOCHEM 1359-5113 6114 2.336 0.198 243 4.6
9 J SUPERCRIT FLUID 0896-8446 2629 2.189 0.434 221 5.1
10 COMBUST FLAME 0010-2180 7089 2.184 0.183 131 9.2

Sunday, August 31, 2008

Several symbols in LaTex expression

underscore = \_
percent sign = \%

Friday, August 29, 2008

Editor Tutorials

vi Editor: http://www.eng.hawaii.edu/Tutor/vi.html

nano Editor: http://mintaka.sdsu.edu/reu/nano.html

LaTex new commands

\newcommand{\degrees}{$\!\!$\char23$\!$}
\newcommand{\pageseparate}{\clearpage}
\newcommand{\refhere}{\textcolor{red}{(Refs.) }}
\newcommand{\tcol}[1]{\textcolor{red}{#1}}
\newcommand{\vspaceOne}{\vspace{1in}}
\newcommand{\vspaceTwo}{\vspace{2in}}

Tuesday, August 26, 2008

CEE696 (618) Scientific Parallel Computing for Engineers

Classroom and time change

Tuesday 3:00 pm - 4:50 pm, Holmes 244
Tuesday 5:00 pm - 5:50 pm, POST 214 (Don Kim Lab.)

Sunday, August 24, 2008

LaTex Useful Packages

\usepackage{amsmath}
\usepackage{color} % To make texts and math colored
\usepackage{geometry}\geometry{letterpaper} % To change size of paper
\usepackage{graphics,graphicx,epstopdf,psfig} % Graphic packages frequently used
\usepackage{nomencl} % To generate nomenclature
\usepackage{setspace}\doublespacing %To set doublespacing and singlespacing
\usepackage{revnum} % To reverse enumerate, 4,3,2, and 1.
\usepackage{wrapfig } % To have inline figures
\usepackage{hyperref} % To have hypertext protocol references
\usepackage{soul} % To highlight texts
\usepackage{ulem} %To strike words

Friday, August 22, 2008

Three values

Vision, Discipline, and Passion

The 7 habits of Highly Effective People (by Stephen R. Covey)


1. Be Proactive
2.
Begin with the End in Mind
3.
Put First Things First
4.
Think Win/Win
5.
Seek First to Understand, Then To Be Understood
6.
Synergize
7.
Sharpen the Saw
8.
Find your voice and inspire others to find theirs



Saturday, August 16, 2008

How to change the background image of beamer

It is possible to use a different background template, e.g. an empty
Powerpoint file that is converted to PNG, JPG, EPS or PDF.

\usebackgroundtemplate{
\includegraphics[width=\paperwidth,
height=\paperheight]{LaQuSo}
}

Friday, July 11, 2008

Wednesday, July 2, 2008

Cluster Expansion: 2007 version

2007 version

Computing Hardware:
  • 16 nodes, each node with 2 Xeon (2.3 GHz) processors, and 2 GB memory per processors
  • 3 new nodes, each new node with 2 quad core 2.33 GHz processors, and 2 GB memory per processors
  • Total: 56 processors (> 2.3 GHz) with 112 GB memory

Disk Space
  • 200 GB for working space
  • 2.0 TB for backup and data storage
Software:
  • Queueing system: Platform LSF (Load Sharing Facility) pro 6.2
  • Compilers: Intel FORTRAN 90 and Intel C/C++
  • Library: BLAS, BLACS, ATALAS, LAPACK, ScaLAPACK, OPENMPI

Friday, June 27, 2008

how to install openvpn in Ubuntu

login as a root, type and enter:

aptitude update
aptitude install openvpn

Monday, May 26, 2008

Life Motto

The motto of my life is "Beautiful Challenge".

-- Sumi Jo --

Saturday, May 24, 2008

FEW


Food

Energy

Water

(by Prof. Jaechun Choe)

Vision

"Vision is foresight with insight based on hindsight"
--Dr. Myles Munroe --

Tuesday, April 8, 2008

Laminar Flow

Friday, March 14, 2008

American Physical Society Meeting

During my stay at Rice University in the middle of my first sabbatical, it was a great time to attend 2008 March meeting of American Physical Society. Here are some pictures of New Orleans.



Saturday, February 16, 2008

Maui High Performance Computing Center



System Name: Jaws
Site: Maui High-Performance Computing Center (MHPCC)
System Family: Dell PowerEdge ClusterSystem 
Model: PowerEdge 1955Computer PowerEdge 1955, 3.0 GHz, Infiniband
Vendor: Dell
Application area: Research
Main Memory: 5200 GB
Installation Year: 2006
Operating System: RedHat Enterprise 4
Memory 5200 GB
Interconnect: Infiniband
Processor: Intel EM64T Xeon 51xx (Woodcrest) 3000 MHz (12 GFlops)

Introductory MPI tutorial




Friday, February 15, 2008

WYDIWIG

What You Design is What You Get

Tuesday, February 12, 2008

latex strike

latex strike
\usepackage{ulem}
\sout{Bill Clinton}G.W. Bush is the pres.

from here



Friday, February 1, 2008

Notes on using Job Arrays (MPI), job dependencies, and processor reservation

Click Here

By Mehdi Bozzo-Ray from Platform Computing Inc.

ssh-keygen


A good tutorial for ssh-keygen and how to connect a remote host without using a password can be found HERE.

Thursday, January 31, 2008

How to use a three-button mouse as in Linux environment

Here are some possible solutions.



Wednesday, January 23, 2008

Excellent SSH tunneling tutorial

Mike Chirico (mchirico@users.sourceforge.net) or (mchirico@comcast.net)
Copyright (c) 2005 (GNU Free Documentation License)
Last Updated: Fri Nov 11 15:49:44 EST 2005 
http://souptonuts.sourceforge.net/sshtips.htm

Friday, January 18, 2008

One Day Oahu City Tour

1. Punch Bowl Cemetery
  

2. Iolani Place + Kamehameha Statue
 

3. Aloha Tower (go up to the top for photo + lunch)
 

4. Pali Mountain look out
  

5. Korean President S. M. Lee's statue and Korean Christian Church

One Day Oahu East Tour

Depart at 8:00 am

1. Kapiolani Community College: use student parking, take photo with tall cactus


2. Diamond head: go around or climb up, when exit temporarily park at the scenic point at the right hand side and watch Hanauma Bay

3. Optional: Kahala Mandalin Hotel for beach and dolphin shows

4. Koko Marina Center: lunch at McDonal or Zippy (bento order for group tour)


5. Hanauma Bay


6. Sandy Beach - watch surfing

7. Sea Life Park

8. Return to and enjoy Hanuma Bay until sunset

Tuesday, January 1, 2008

Labels

Blog Archive