Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5608049
  • 博文数量: 745
  • 博客积分: 10075
  • 博客等级: 上将
  • 技术积分: 7716
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-29 12:09
文章分类

全部博文(745)

文章存档

2019年(1)

2016年(1)

2010年(31)

2009年(88)

2008年(129)

2007年(155)

2006年(197)

2005年(143)

分类:

2005-11-02 15:33:10

1,exit或ctrl+d可以退出终端
2,$符号代表是K或者POSIX shell,%符号代表是C shell
3,对设定密码的要求:至少包含六个字符;至少包含两个字母;至少包含一个非字母字符
4,ctrl+h:删除一个字符;ctrl+u:删除一行的所有字符
5,ctrl+c:退出正在执行的程序
6,shift+上箭头:向上翻页;shift+下箭头:向下翻页
7,whereis command:查找command命令的路径,比如:
# whereis passwd
passwd: /etc/passwd /usr/bin/passwd
如果想更改whereis命令搜索的路径,可以使用带-b,-m,-s参数来限制到对二进制,man联机手册,源代码的搜索范围
8,write username:将消息发送给同样登陆在系统上的另外一个用户(其原理相当于QQ)
按下回车发送消息,按下ctrl+d中断对话
9,mesg:此命令用于设置是否允许他人给自己发送消息,# mesg y意为允许.但是无论怎样改,阻止不了root发送过来的消息
10,news:展示系统收到的新消息;# news -a:展示所有的消息
11,UNIX中三个重要的静态文件系统:/opt,/usr,/sbin;UNIX中七个重要的文件系统:
/home,/etc,/stand,/tmp,/dev,/mnt,/var
其中/sbin文件系统包含系统启动和关闭的一系列命令;/etc文件系统包含许多重要的系统配置文件;
/stand/vmunix包含UNIX的核心文件,这个程序在系统启动时运行,并监控所有系统操作
12,绝对路径的实例:lp /home/user3/memo/f1
   相对路径的实例:lp f1(这里就可以明显看出二者之间的概念区别)
13,# ls -R xx:递归列出xx里面的所有内容
14,不带任何参数的cd命令使用户回到系统给它指定的专用路径
15,find命令的常用格式:
find path_list -name expression
16,lp命令的常用格式:
lp [-ddest] [-nnumber] [-ooption] [-t title] [-w] [file...]
其中dest指打印机名称,number指要打印的份数,-w指当打印任务完成之后在用户终端显示
17,查看打印任务的两个常用命令:
# lpstat # lpstat -t
18,使用cancel命令可以退出打印任务,常用的格式是:
# cancel [a request ID]
# cancel [a printer name]
19,更改属性的两个命令,一个是chmod,要特别注意的是chmod = filename的形式,这意味着所有的权限都被去掉;另一个是用命令mesg n,这将group以及other的所有权限去掉
20,使用cp命令时最好习惯性的带上参数-i,这样在进行复制的时候防止文件被覆盖的情况发生.命令mv和cp用法类似
21,对于文件来说,默认的属性是rw-rw-rw-,对于目录来说,默认的属性是rwxrwxrwx
22,对于访问控制的两条命令:
# lsacl filename
# chacl ACL filename
对允许访问的文件有四种定义:
(u.g,rwx):specific user,specific group
(u.%,rwx):specific user,any group
(%.g,rwx):any user,specific group
(%,%,rwx):any user,any group
23,各种shell及对应路径:
/usr/bin/sh:POSIX shell
/usr/bin/ksh:Korn shell
/usr/old/bin/sh:Bourne shell
/usr/bin/csh:C shell
/usr/bin/keysh:A context-sensitive softkey shell
/usr/bin/rksh:Restricted Korn shell
/usr/bin/rsh:Restricted Bourne shell
24,一个有关alias命令的实例:
# alias go='cd'
# alias there=/home/user3/tree/ford/sports
# go there
# pwd
/home/user3/tree/ford/sports
25,history命令
# history -n:列出最近使用的n条命令
# history a z:列出最近使用的第一个字母为a直到第一个字母为z的命令(实际列出所有命令)
实例:
# history 3 5
3 date
4 pwd
5 ls
#
# r 4(运行history罗列出来编号为4的命令,也可以输入r p)
pwd
/home/kelley
26,ESC+k:逐个返回以前输入过的命令
27,'?'在适当情况代表单个字符;'[a-z]'代表从字母a到字母z中选择一个出来;'*'代表所有字符
28,'>'用于将一个命令的输出定位到文件里面,'>>'用于将一个命令的输出追加到文件的末尾,这样命令的输出不显示在屏幕上
29,wc命令格式:
wc [-lwc] filename
例如:
test
97 903 6384 test
30,tar命令相关:
# tar -cvf /dev/rmt/0m myfile:create an archive
# tar -tvf /dev/rmt/0m:get a table of contents from the archive
# tar -xvf /dev/rmt/0m myfile:extract a file from archive
tar命令相应的参数:
c:A new archive is created
x:Files are extracted from the archive
t:A table of contents of the archive is printed
r:Files are added to the end of the archive
u:Files are added to the archive if they are new or modified
v:Echoes filenames to screen as they are archived or restored - verbose
f:Designates the file where the archive will be written to

阅读(2230) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~