unix and linux
文章平均质量分 80
iteye_5554
这个作者很懒,什么都没留下…
展开
-
How to export environment variables to parent
say, you set up all the variables in one shell --- env.ksh, as below export JAVA_HOME=/usr/java/jdk1.5.0_09/export M2_HOME=/home... export ANT_HOME=/home/apache-ant-1.7.0export PERFORCE_HOME=/home/...2009-01-13 18:28:27 · 67 阅读 · 0 评论 -
check linux memory usage
/proc/meminfo contain all your memory usage information:-type: cat /proc/meminfo and you will get:- vmstat display memory usage in summary mode:-type: vmstat and you will getClick on the image to se...原创 2009-08-23 15:00:10 · 130 阅读 · 0 评论 -
variable definition
A sample shell script #!/bin/sh viperooe_home=`dirname $0` source $viperooe_home/env-viperooe.sh instancename=$1 cd $viperooe_home/persistence/$1 currentDate=`date '+%Y%m%d'` echo $currentDa...原创 2009-08-18 09:40:45 · 136 阅读 · 0 评论 -
Csh, Bash, and Ksh----a lesson of blood and tear
On Jun 23rd, 2009. I am working on a linux box. I find, constantly a lot of commands doesn't work, like what I usually did, vi, export, java. and I checked the path, the path is not seperated by : ...原创 2009-06-23 10:15:38 · 99 阅读 · 0 评论 -
tricky questions
Q: modifier in $ (/) A: Don't use $PATH, instead, use ${PATH}原创 2009-04-21 11:35:58 · 125 阅读 · 0 评论 -
Linux Simple Shell Summary
generate env classpath from lib folder for libfile in $(find lib/*) do classpath=$classpath:./$libfile done export classpath=$classpath原创 2009-03-13 15:24:37 · 92 阅读 · 0 评论 -
linux command line reference for common operations
Command Description • apropos whatis Show commands pertinent to string. See also threadsafe • man -t man | ps2pdf - > man.pdf make a pdf of a manual page which command Show full path nam...原创 2009-03-10 11:17:18 · 155 阅读 · 0 评论 -
difference between sourcing / running / execing
./script creates a new shell and executes each command in the script within the new shell. When the end of the script file is encountered, the new shell exits. Any changes in the new shell caused by t...原创 2009-03-10 10:31:20 · 99 阅读 · 0 评论 -
v i addvanced operation.
1. copy and paste yy : copy 光标所在的行nyy: copy n lineyw: copy 光标所在的单词nyw: copy 光标所在位置到其后的n 个单词(未必是同一行)y$: copy 光标所在位置到行尾($是行尾的标示)ny$: copy 光标所在位置之后的n行(包括当前行,当前行=y$)p: paste 在光标所在位置之右P: paste 在光标所在位...原创 2009-03-09 10:38:11 · 125 阅读 · 0 评论 -
linux commands summary
dynamic monitor log file: bash-3.00$ tail -f console.log estimate disk space usage: bash-3.00$ df -hFilesystem Size Used Avail Use% Mounted on/dev/cciss/c0d0p3 127...2009-03-07 13:13:39 · 78 阅读 · 0 评论 -
Linux, Unix中Bash环境变量的设定顺序 zz
转载自这里 和Bash的环境设定有关的文件有/etc/profile (主要)$HOME/.bash_profile (主要)$HOME/.bash_login$HOME/.profile$HOME/.bash_logout (主要)$HOME/.bashrc (主要)/etc/bashrc 说明如下: 登入(login)时 先执行 /etc/profile 接着bash会检查使...原创 2009-02-17 09:26:49 · 89 阅读 · 0 评论 -
how to set up env variable in linux
Summary: Step 1) Know your current shell. echo $SHELL Step 2) Set env if csh or tcsh vi ~/.schrc setenv PATH “/bin:/usr/bin:/usr/sbin:/usr/ucb/bin” if bash vi ~/.bashrc export PAT...原创 2009-09-03 10:46:38 · 168 阅读 · 0 评论