solaris essential

<div>1: default shell:? Korn Shell
<div>2: ONC+ : Open Network Computing
<div>3: NIS : Network Information Service???? provides network information name services to clients
<div>4: change from command-line login to X ,type "exit"?? then then press Return
<div>5: ls -F? check the file or directory type.
<div>6: cp -i?? prevent overwritting existing files.
<div>7: vi -R? ?open file in read-only mode.?? vi -r to recover file..
<div>????view?=?vi -R?? view filename????view file in read-only mode .
<div>8: <span lang="ZH-CN">useradd -u 512 -g 1 -c 'SA-Xu, Collin' -d /export/home/xcollin -m -s /usr/bin/bash xcollin</span>
<div><span lang="ZH-CN">9: In solaris system,? change the ip address:??edit?below three files?? /etc/inet/hosts /etc/inet/networks /etc/inet/netmasks </span>
<div><span lang="ZH-CN">10: vi usage,???</span>
<div><span lang="ZH-CN">?delete the specified line?? :5,18d???? delete 5 to 18 lines.</span>
<div><span lang="ZH-CN">?U? undo all the changes at the current lin. </span>
<div><span lang="ZH-CN">?u? undo the previous change.</span>
<div><span lang="ZH-CN">?:2,5 co?8?? copy? line 2?- 5? and put them after line 8.</span>
<div><span lang="ZH-CN">?:3,7 m 10??move line 3?- 7 ?and put them after line 10</span>
<div><span lang="ZH-CN">?:set ic search ignoring? case</span>
<div><span lang="ZH-CN">?:set noic search to be case sensitive.</span>
<div><span lang="ZH-CN">?:set all displays all the set argument.</span>
<div><span lang="ZH-CN">to create an automatic customization? for all of your vi sessions, complete the flowing commands. (also applying for linux.)</span>
<div><span lang="ZH-CN">????1) create a file in your home directory called .exrc</span>
<div><span lang="ZH-CN">????2) enter the set [i]variable[/i]? without preceding colon.</span>
<div><span lang="ZH-CN">11: ls [a-d]*?? list all files started with a - d.</span>
<div><span lang="ZH-CN">??????ls [bp]*??? list all files started with b or p</span>
<div><span lang="ZH-CN">??????ls -n? lists detail information? like ls -l.? but show the uid and gid instead of owner's name.</span>
<div><span lang="ZH-CN">??????-rw-r--r-- 1 [b]512[/b] [b]1[/b] 270 Nov 8 11:13 dat</span>
<div><span lang="ZH-CN">???????</span>
<div><span lang="ZH-CN">12: umask?? file default value 666?? directory default value 777</span>
<div><span lang="ZH-CN">???????if the umask is 022? then the new file?default value is 644? new directory value is 755</span>
<div><span lang="ZH-CN">??????? you can't create a default file value 777.? the most privilege you create a file is 666.</span>
<div><span lang="ZH-CN">13: grep </span>
<div><span lang="ZH-CN">????grep -i? search?for both uppercase and lowercase characters</span>
<div><span lang="ZH-CN">????grep -n display the line number? in the file.</span>
<div><span lang="ZH-CN">????grep -c count the lines that match the pattern</span>
<div><span lang="ZH-CN">????grep -v display the lines that do not match the pattern</span>
<div><span lang="ZH-CN">????grep -w search for the expression as a complete word. ignoring? substrings? meet the expression.</span>
<div><span lang="ZH-CN">????grep -l? to search the names of the files that contain the pattern</span>
<div>?
<div><span lang="ZH-CN">????grep '^no'? /etc/passwd?????to?find all the [b]lines that begin with?[/b]?the letter 'no' in /etc/passwd file</span>
<div><span lang="ZH-CN">??? grep 'A...n' /etc/passwd???? grep the line that?start with 'A' then follows?3 charactor,?then end with 'n'</span>
<div>????grep 'adm$'??/etc/group?????? grep[b] lines?that? the end[/b] of lines?is ?'adm'??
<div>???????????????????????????????????????????????????
<div><span lang="ZH-CN">????egrep?: extended grep?</span>
<div><span lang="ZH-CN">????egrep '[a-z]+body'??/etc/passwd???To search for?all lines that?have[b] words followed by[/b]?'body'</span>
<div><span lang="ZH-CN">????egrep '(Network|uucp) Admin' /etc/passwd?? To search lines that contain 'Network Admin'or'uucp Admin' </span>
<div><span lang="ZH-CN">????</span>
<div><span lang="ZH-CN">14: find</span>
<div><span lang="ZH-CN">find -atime +5???? files?that have not been [b]accessed[/b] for more than 5 days.?? </span>
<div><span lang="ZH-CN">find -atime -5????? files?that have been accessed in 5 days.? </span>
<div><span lang="ZH-CN">find -mtime +5????files that have not been [b]modified[/b] for more than 5 days</span>
<div><span lang="ZH-CN">find -mtime -5???? files that have been modified in 5 days</span>
<div><span lang="ZH-CN">15: parent process and child process</span>
<div>
<span lang="ZH-CN">when one process creates another,the first process is considered to be parent process,the new process </span><span lang="ZH-CN">is called the child process.</span>
<div><span lang="ZH-CN">while the child process runs, the parent process waits.when the child process finishes its task, it informs the parent process,the parent process then terminates the child process.</span>
<div><span lang="ZH-CN">16: ps -ef </span>
<div><span lang="ZH-CN">UID????PID????PPID????C????STIME????TTY????TIME????CMD</span>
<div><span lang="ZH-CN">root????291????1????????0????OCT 23?????????????0:18????/usr/lib/saf -t 300</span>
<div><span lang="ZH-CN">??</span>
<div><span lang="ZH-CN">UID: user name of the owner process</span>
<div><span lang="ZH-CN">PID: the process id</span>
<div><span lang="ZH-CN">PPID: the parent process id</span>
<div><span lang="ZH-CN">C:cpu utilization for scheduling.(Not used now)</span>
<div><span lang="ZH-CN">STIME:the time the process started</span>
<div><span lang="ZH-CN">TTY:the controlling terminal for the process.?'?' indicates that the process started without use of a terminal</span>
<div><span lang="ZH-CN">TIME:the cumulative execution time for the process</span>
<div><span lang="ZH-CN">CMD: the command name</span>
<div>?
<div><span lang="ZH-CN">17: pgrep?</span>
<div><span lang="ZH-CN">pgrep -l ssh????????????????????????pgrep -lf ssh</span>
<div><span lang="ZH-CN">948????sshd??????????????????????????948????/usr/lib/ssh/sshd<br>2967???sshd?????????????????????????2967??/usr/lib/ssh/sshd<br>2966????sshd????????????????????????2966??/usr/lib/ssh/sshd</span>
<div>?
<div><span lang="ZH-CN">pgrep -lt pts/2?????display the terminal pts/2's process??(must be 'lt' not 'tl')</span>
<div><span lang="ZH-CN">pgrep -lU root???????displays the root's process (U=user) (must be 'lU' not 'Ul')</span>
<div>?
<div><span lang="ZH-CN">18:job</span>
<div><span lang="ZH-CN">a job is a process that the shell can manage.Because jobs are processes,so each job has an associated PID. The shell also assigns each job? a sequential job ID number.</span>
<div><span lang="ZH-CN">jobs?? list the current jobs</span>
<div><span lang="ZH-CN">fg %n??bring a background job to run in the foreground??????n is the job ID???? not the pid</span>
<div><span lang="ZH-CN">bg %n? bring a foreground job to run in the background??? First you need to press <span style="text-decoration: underline;">ctrl+z</span> to stop the foreground process,then you use <span style="text-decoration: underline;">bg %1</span> to let the command run in b</span>
<div>?
<div><span lang="ZH-CN">ctrl+z? stops a foreground job.</span>
<div><span lang="ZH-CN">kill %1 terminate job 1</span>
<div>?
<div><span lang="ZH-CN">19:function</span>
<div><span lang="ZH-CN">typeset -f??? list all? functions</span>
<div><span lang="ZH-CN">use one command to execute a series of command. you can use the following three methods.</span>
<div><span lang="ZH-CN">1): alias???? alias info='uname -a; id; date'?????? info</span>
<div><span lang="ZH-CN">2): function??? function infor {?uname -a; id; date;?}???? infor??????? (before date, there's a semicolon)</span>
<div><span lang="ZH-CN">3): shell script?? </span>
<div>?
<div><span lang="ZH-CN">20:set</span>
<div><span lang="ZH-CN">set -o? show current option settings.</span>
<div><span lang="ZH-CN">set -o noclobber?? set noclobber option on</span>
<div><span lang="ZH-CN">set +o noclobber?? set noclobber option off</span>
<div>?
<div><span lang="ZH-CN">21: jar???</span>
<div><span lang="ZH-CN">?the usage equals to tar, jar?package file and compress it.?? </span>
<div><span lang="ZH-CN">jar? cvf? file.jar?? file??</span>
<div><span lang="ZH-CN">jar? xvf??file.jar</span>
<div><span lang="ZH-CN">----------------------------------------------------------------</span>
<div><span lang="ZH-CN">compress -v? filename???? file.Z??????????????? compress file??????????? -v option shows the percentage compressed</span>
<div><span lang="ZH-CN">zcat file.tar.Z|tar xvf -?????????????????????????????view?file.tar.Z without?uncompressing it.??? </span>
<div><span lang="ZH-CN">uncompress?? file.tar.Z???????????????????????????? restore file</span>
<div><span lang="ZH-CN">------------------------------------------------------------------</span>
<div><span lang="ZH-CN">another command to compress files : gzip?? </span>
<div><span lang="ZH-CN">gzip?? file.tar????----> file.tar.gz</span>
<div><span lang="ZH-CN">gunzip file.tar.gz? ---------> file.tar</span>
<div><span lang="ZH-CN">gzcat? file.gz????? view the file.gz</span>
<div><span lang="ZH-CN">gzact file.tar.gz?| tar xvf -???? view file.tar.gz</span>
<div><span lang="ZH-CN">-------------------------------------------------------------------</span>
<div><span lang="ZH-CN">zip: compress and archive files</span>
<div><span lang="ZH-CN">zip? file.zip? file1? file2? file3...????? zip file 1 ,2 ,3 to file.zip</span>
<div><span lang="ZH-CN">unzip file.zip?????????????????????????????? unzip file</span>
<div><span lang="ZH-CN">unzip -l file.zip?????????????????????????????view file.zip</span>
<div>?
<div>?
<div>?
<div><span lang="ZH-CN">22: rlogin</span>
<div><span lang="ZH-CN">rlogin vszcdevload05?? </span>
<div><span lang="ZH-CN">rlogin -l nagios vszcdevload07?? use another user to login to host.</span>
<div>?
<div><span lang="ZH-CN">23:profile</span>
<div><span lang="ZH-CN"><span style="font-family: Times New Roman;">[size=small;]add the environmental variable<br>1:edit /etc/profile<br>2: add this two line?<br>PATH=$PATH:/usr/sfw/bin:/usr/ccs/bin:.<br>export PATH<br>3:check PATH<br>echo $PATH [/size]</span></span>
<div>
<span lang="ZH-CN"></span>?
<div><span lang="ZH-CN"><span style="font-family: Times New Roman;">[size=small;]edit specified user's profile,for example edit oracle's profile[/size]</span></span>
<div><span lang="ZH-CN"><span style="font-family: Times New Roman; font-size: small;">1:ls -a </span></span>
<div>
<span lang="ZH-CN"><span style="font-family: Times New Roman; font-size: small;">2:vi .profile?</span></span><!--WizHtmlContentEnd-->
<div>?
<div><span lang="ZH-CN">24: time zone configuration? command (both for linux and solaris)</span>
<div><span lang="ZH-CN">tzselect???? </span>
<div>?



[list]
[*][url=http://dl.iteye.com/topics/download/5835ce98-1632-3ce8-8ecf-cc3a1380b200]Solaris_10_SA100S10_SG.pdf[/url] (1.8 MB)


[*]下载次数: 0

[/list]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值