原创 隱藏oracle命令行登陸密碼

命令行隱藏數據庫用戶名和密碼 #!/bin/ksh heading=on SYSTEM_CONNECT="dbname/dbpass" $ORACLE_HOME/bin/sqlplus -s /nolog <<!! se

原创 15.LSB

Unix SVID: AT&T UNIX System V Interface Definition POSIX: Portable Operating System Interface BSD LSB: Linux St

原创 ipc命令

1. ipcs # all ipcs ipcs -a # Shared Memory ipcs -q # Message Queues ipcs -m # Semaphore(信號量) ipcs -s # Limits ipc

原创 awk

AWK 語法 awk [options] ‘BEGIN{action}pattern{action}…END{action}’ file awk [options] -f program.awk file options -F fs

原创 正則表達式

正則表達式

原创 csh(tcsh)

1. TC Shell Initialize /etc/csh.cshrc /etc/csh.login .cshrc 2. Prompt # The primary prompt set prompt = "$LOGNAME >

原创 sh(bsh)

1. Initialize /etc/profile .profile 2. Prompt PS1($): the primary prompt PS2(>): the secondary prompt PS1=”uname -

原创 bash

startup The first process: init init -> getty -> login -> ksh initialization file: .profile environment file: .kshr

原创 創建SSH互相關係

測試用戶:dev和test 生成SSH密鑰,均執行該命令 /usr/bin/ssh-keygen -t rsa 修改目錄權限,均執行該命令 chmod -R 700 ~/.ssh 複製公鑰文件 cd ~/.ssh cp id_r

原创 diff

diff -Naur passwd.old passwd.new > passwd.patch (N: new file a: text, u: unified; r: recursive) cat passwd.patch patc

原创 條件測試

類型 [ ] [[ ]](ksh/bash, keyword) (()) 數字測試 -eq -ne -lt -le -gt -ge 同[] >, >=, <, <=, ==, != 文件測試 -r -l -w -x -f

原创 rpm

dpkg: Debian series RPM: Redhat series Redhat RPM rpm, rpmbuild YUM(yum) Debian DPKG dpkg A

原创 文件操作

f = open(file, mode) mode取值 r: open for reading (default) w: open for writing, truncate the file first a: open for

原创 字符串處理

字符串長度(String Length) ${#string} expr length $string expr "$string" : '.*' 匹配的最小子串的長度(Length of Matching Substring at Be

原创 shell數組

1. seq [FIRST [INCREMENT]] LAST -s: –separator=STRING -w: –equal-width seq -s'#' 1 20 | sed 's/[0-9]*//g' seq -w 1 10