<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<script language="Javascript">
<!--
// Check the browser version.
function checkVersion() {
if (navigator.appVersion.charAt(0)>=3) return true;
if (navigator.appVersion.charAt(0)>=4) return true;
else return false;
}
if (checkVersion()) {
toc1on = new Image();
toc1on.src = "buttonart/backon.gif";
toc1off = new Image();
toc1off.src = "buttonart/back1.gif";
toc2on = new Image();
toc2on.src = "buttonart/forwardon.gif";
toc2off = new Image();
toc2off.src = "buttonart/forward.gif";
toc3on = new Image();
toc3on.src = "buttonart/homeon.gif";
toc3off = new Image();
toc3off.src = "buttonart/home.gif";
toc4on = new Image();
toc4on.src = "buttonart/tocon.gif";
toc4off = new Image();
toc4off.src = "buttonart/toc.gif";
toc5on = new Image();
toc5on.src = "buttonart/bhomeon.gif";
toc5off = new Image();
toc5off.src = "buttonart/bhome.gif";
toc6on = new Image();
toc6on.src = "buttonart/bbackon.gif";
toc6off = new Image();
toc6off.src = "buttonart/bback.gif";
toc7on = new Image();
toc7on.src = "buttonart/bforwardon.gif";
toc7off = new Image();
toc7off.src = "buttonart/bforward.gif";
toc8on = new Image();
toc8on.src = "buttonart/btocon.gif";
toc8off = new Image();
toc8off.src = "buttonart/btoc.gif";
}
function img_act(imgName) {
if (checkVersion()) {
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
}
}
function img_inact(imgName) {
if (checkVersion()) {
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
}
}
// -->
</SCRIPT>
<META NAME="GENERATOR" Content="Symantec Visual Page 1.0.1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<TITLE>Ch 5 -- General Commands</TITLE>
</HEAD>
<BODY BACKGROUND="buttonart/bg1.gif" BGCOLOR="#FFFFFF">
<P>
<TABLE BORDER="0" WIDTH="600">
<TR>
<TD WIDTH="80" VALIGN="TOP"><IMG SRC="buttonart/sams.gif" WIDTH="75" HEIGHT="24" ALIGN="BOTTOM" BORDER="0"><BR>
<BR>
<A HREF="toc.htm" onMouseover="img_act('toc4')" onMouseout="img_inact('toc4')"><IMG
SRC="buttonart/toc.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="TOC" BORDER="0"
NAME="toc4"></A><BR>
<A HREF="ch04.htm" onMouseover="img_act('toc1')" onMouseout="img_inact('toc1')"><IMG
SRC="buttonart/back1.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="BACK" BORDER="0"
NAME="toc1"></A><BR>
<A HREF="ch06.htm" onMouseover="img_act('toc2')" onMouseout="img_inact('toc2')"><IMG
SRC="buttonart/forward.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="FORWARD" BORDER="0"
NAME="toc2"></A><BR>
<A HREF="index.htm" onMouseover="img_act('toc3')" onMouseout="img_inact('toc3')"><IMG
SRC="buttonart/home.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="HOME" BORDER="0"
NAME="toc3"></A></TD>
<TD WIDTH="520" VALIGN="TOP">
<H2><FONT COLOR="#000077">UNIX Unleashed, System Administrator's Edition</FONT></H2>
<P>
<H1 ALIGN="CENTER"><FONT COLOR="#000077">- 5 -</FONT></H1>
<H1 ALIGN="CENTER"><FONT COLOR="#000077">General Commands</FONT></H1>
<P><I>by Sanjiv Guha</I></P>
<P>UNIX has commands that are native to UNIX, and commands that you (or someone at
your installation) can write. Depending on the UNIX version you are running and the
shell you are in, the commands differ. In this chapter, commands that are available
in most UNIX versions are discussed. Each command can have several arguments and
several flags associated with it. The general form of a command is</P>
<PRE><FONT COLOR="#0066FF">command [flags] [argument1] [argument2] ...
</FONT></PRE>
<P>Flags are preceded by a hyphen. Several flags can be specified together with only
one hyphen. For example, the following two commands are equivalent:</P>
<PRE><FONT COLOR="#0066FF">ls -a -l
ls -al
</FONT></PRE>
<P>Depending on the command, the arguments can be optional or mandatory. All commands
accept inputs from the standard input, display output on standard output and display
error message on standard error. You can use UNIX redirection capabilities to redirect
one or more of these. Standard input is where UNIX gets the input for a command,
standard output is where UNIX displays output from a command, and standard error
is where UNIX displays any errors as a result of the execution of a command.</P>
<P>All commands, when executed successfully, return a zero return code. However,
if the commands are unsuccessful or partially successful, they return non-zero return
codes. The return codes can be used as part of control logic in shell scripts.
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>CAUTION:</B></FONT> Though the commands described here work
on most of the UNIX systems in a general way, the behavior of the flags associated
with each command can differ. You should use the <TT>man</TT> command on your system
to learn about details of the command and its flags.
<HR>
</BLOCKQUOTE>
<H2><FONT COLOR="#000077"><B>User Related Commands</B></FONT></H2>
<P>The commands related to logging in and out of the system are discussed in the
following sections. User Related Commands are those that are used to log in and out
of your UNIX system. They might differ slightly from system to system, but the commands
discussed here are common to most systems.
<H3><FONT COLOR="#000077"><TT><B>login</B></TT></FONT></H3>
<P>Whenyou start working on a UNIX system, the first thing you need is a login ID.
Each user in a UNIX system has a unique login ID that identifies the user and any
characteristics associated with the user. When you first connect to a UNIX system,
you get the login prompt. The login prompt usually asks for the following information:</P>
<PRE><FONT COLOR="#0066FF">login:
password:
</FONT></PRE>
<P>You will be allowed into a system, if, and only if, you enter the login ID and
password correctly. When the login is successful, you get information, such as last
unsuccessful login, last successful login, whether you have any mail, messages from
the system administrator, and more. Following is an example of a successful login:</P>
<PRE><FONT COLOR="#0066FF">*******************************************************************************
* *
* You are now logged on to the host1 computer *
* *
*******************************************************************************
Last unsuccessful login: Thu Nov 7 22:32:41 1996 on tty1
Last login: Fri Nov 8 01:17:04 1996 on tty1
/u/testuser:>>
</FONT></PRE>
<P>While logging in, there are shell scripts that are executed. The script that gets
executed depends on the shell you are running. For example, in Bourne shell, the
<TT>.profile</TT> file in you home directory is execute, in Korn shell, the file
pointed to by the environment variable ENV is executed.</P>
<P>You should put in as part of the startup file all the commands that you want to
be executed before login. For example, you can set the search path, the terminal
type, and various environment variables or run special programs, depending on your
requirements. The follo
没有合适的资源?快使用搜索试试~ 我知道了~
Unix系统大全——系统管理员卷1
共141个文件
jpg:48个
gif:43个
htm:33个
需积分: 9 13 下载量 57 浏览量
2010-08-28
23:31:22
上传
评论 1
收藏 1.97MB RAR 举报
温馨提示
包括了主要的Unix操作系统命令,介绍了命令的各种用法,及如何通过命令进行系统管理。
资源推荐
资源详情
资源评论
收起资源包目录
Unix系统大全——系统管理员卷1 (141个子文件)
BFORWARD.000 786B
BUTTON 6KB
BUTTONO 9KB
25UNI03.GIF 72KB
COVER.GIF 47KB
19UNI10.GIF 34KB
19UNI09.GIF 34KB
19UNI08.GIF 22KB
19UNI12.GIF 22KB
19UNI07.GIF 21KB
19UNI06.GIF 19KB
19UNI01.GIF 17KB
19UNI11.GIF 17KB
19UNI02.GIF 12KB
25UNI01.GIF 11KB
25UNI02.GIF 10KB
19UNI03.GIF 7KB
19UNI04.GIF 7KB
27UNI02.GIF 6KB
21UNI01.GIF 6KB
HEAD.GIF 6KB
06UNX01.GIF 5KB
19UNI05.GIF 5KB
27UNI01.GIF 5KB
CORP.GIF 3KB
06UNX02.GIF 3KB
SOWER.GIF 2KB
BACKON.GIF 933B
HOMEON.GIF 900B
FORWARDO.GIF 886B
TOCON.GIF 877B
BBACKON.GIF 857B
BACK1.GIF 803B
TOC.GIF 800B
SAMS.GIF 799B
SAMS.GIF 799B
BHOMEON.GIF 791B
BTOCON.GIF 785B
FORWARD.GIF 782B
HOME.GIF 727B
BTOC.GIF 715B
BFORWARD.GIF 674B
BBACK.GIF 654B
BHOME.GIF 628B
BG1.GIF 414B
CCC.GIF 109B
CH05.HTM 354KB
CH20.HTM 324KB
CH12.HTM 317KB
CH11.HTM 279KB
CH23.HTM 204KB
CH07.HTM 181KB
CH24.HTM 174KB
CH22.HTM 160KB
CH09.HTM 138KB
CH18.HTM 124KB
CH10.HTM 123KB
CH25.HTM 97KB
CH21.HTM 95KB
CH13.HTM 95KB
CH19.HTM 95KB
CH27.HTM 83KB
CH06.HTM 83KB
CH28.HTM 80KB
CH14.HTM 78KB
CH26.HTM 74KB
CH15.HTM 74KB
CH04.HTM 70KB
CH29.HTM 63KB
CH02.HTM 60KB
CH17.HTM 56KB
CH16.HTM 43KB
CH03.HTM 39KB
FM.HTM 37KB
CH01.HTM 35KB
CH08.HTM 22KB
TOC.HTM 6KB
COPY.HTM 4KB
INDEX.HTM 3KB
23INI01.JPG 42KB
01UNI01.JPG 33KB
08UNI01.JPG 33KB
08UNI02.JPG 30KB
20UNI01.JPG 29KB
01UNI02.JPG 29KB
03UNI01.JPG 29KB
23UNI04.JPG 26KB
23UNI08.JPG 25KB
20UNI02.JPG 24KB
20UNI04.JPG 23KB
23UNI06.JPG 22KB
23UNI05.JPG 22KB
20UNI20.JPG 21KB
20UNI09.JPG 21KB
20UNI27.JPG 21KB
20UNI15.JPG 21KB
20UNI12.JPG 19KB
20UNI17.JPG 19KB
20UNI34.JPG 19KB
20UNI32.JPG 19KB
共 141 条
- 1
- 2
资源评论
Jennie
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功