关键词不能为空

当前您在: 主页 > 英语 >

unix复习文件终极版.doc

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-12 23:42
tags:

-

2021年2月12日发(作者:名族)














































































1.



显示当前目录所有的文件和目录信息



>



Is


>ls XX 0




//list


〃查看指定目录下边的文件信息



2.



显示当前文件目录位置



>



pwd


3.



目录之间切换



>cd


目录名字



>cd ..


切换到上级目录



4.



切换到完全命令模式



>



init 3


>init5


进入命令模式



进入可视化操作界面



5.


用户切换到超级管理员



>su


?


root


//$$


是普通用户



>



SU -


>



su root


〃也可以切换到


root


用户,但是没有超级管理员权 限



#


是超级管理员



6.



超级管理员切换回普通用户



>



exit


7.



查看当前用户是谁



>



whoami


8.



输出一个文件内容



>cat


具体


文件



9.



创建冃录



make directory


>



mkdir hello


>



mkdir hello/world


>



mkdir -p first/second/third


10.


给目录改名字


move


移动



>mv


旧名字新名字



>



mv


>



mv first/second


first/six


〃把


secon d


改名字为


six


〃递归创建


3


个目录



11.


移动目录操作


move


>



mv


目标新的地址



>



mv


目录



〃移动,因为


first 0


录存在



〃改名字,并且移动文件到当前目录



>



mv ten/ first mv


ten/ firstt



〃 移


mv


目标地址



〃改


mv 0


动,只要地址是存在的目录就是移动



名字,地址只要不存在就是改名字



标地址



12.



复制操作


copy


>cp


源文件复制文件



>cp -R


目录



目标目录



〃复制“目录“需要添加参数?


R


< /p>


>cp


源文件目标


/

新的名字〃复制的同吋给起一个新的名字



13.



删除目录、文件



>rm


文件



> rmdir


目录



> rm -rf


〃删除单个文件


〃删除单个目录



〃可以删除一切普通的目录或文件



递归


// kill your self


文件



recursive

< p>
强制


force




14.



输岀文件内容



>



cat


文件



〃一次性输出文件全部内容



>



more


文件



〃分页显示文件内容



敲回车查看下边的内容,不支持回看



中间停止:


q



显示内容百分比



>



less


文件



>



head -n


文件



〃分页显示文件内容



〃查看文件前< /p>


n


行内容



可以通过上、下、左、右查看文件具体内容



停止:


q


没有百分比显示



>tail-n


文件〃查看文件末尾


n


行内容



15.



计算文件行数



> wc


文件





//


计算文件行数



16.



创建文件



> touch filename


〃创建文件



17.



给文件添加内容



>



echo content > filename


〃给文件添加内容[覆盖添加内容,原内容被删除]



>



echo


内容



>> filename


〃给文件追加内容



>



echo


内容>/?


newfilename


〃会创建一个新的文件,并且有添加内容[重定向方



18.



给系统增加一个用户



user add/mod/del


> useradd user name


〃添加一个用户



该方式创建用户,并没有显示设置用户的组



>



useradd -g NNN


用户名〃添加用户并设置组别



>



useradd -g NNN


目录



用户名



>



useradd -u XXX


用户名



18.1


修改用户



〃添加用户并设置家目录、组别



〃添加用户并显示设置用户编号



>



usermod -u

< p>
用户编号


-g


组编号


-d


家目录用户名〃修改用户



18.2


删除用户



>



userdel -r


用户



〃删除用户,并且删除家< /p>


H




19.



给系统创建组



group add/mod/del


groupadd movie


groupadd music


groupadd -g XXX


组名〃添加组并设置组编号



19.1


修改组



>groupmod -n


新名字



旧名字



〃修改组的名字



19.2


删除组



>



groupdel


组名



20.



查看系统用户信息



>



cat /etc/passwd


>



cat /etc/group


用户信息



组的信息



21.



查看具体指令使用参数方法



>



man


指令



22.



给用户设置密码



>



passwd


用户名


问题:



l:what are the two major UNIX system versions?


'AT&T UNIX version


'berkeley UNIX


2:what is the general format of a unix comma nd?


$$ comma nd [options] [arguments]


3:name the different types UNIX shells whatare the prompt signs for UNIX shell?


Bourne shell (sh)$$267




Korn shell (ksh)$$


C shell (csh)%


Bourne again shell (bash)$$


4:what are the editor in UNIX operting system?


Line editors55




56




Full screen editors


5:what is the differe nt between a relative and absolutepath name?


/software/jiao/jiao.c


(absolute)


software/john/ (relative)


6:UNIX is mostly written in the (assembly) Ianguage


7:BSD stand :Berkeley software distribution


8(head) comma nd is used to display the top of the file


9:(pipe)and (socket)are special file types


10:in vi (7j )command is used to go to the 7


th


line


ll:explai n the following comma nds with descripti on .opti onand example Wc




Head



first line of file


Tail :last line of file


Wc



to find out the number of lines,words or characters


-l:lines


?


w:words


-c:characters


Taii-


Head-


12:what is shell script?write a shell script program that will do the following tasks in order 'shows the


current date and time


$$date


'shows the number of users on the system


$$who


'display the current month calendax


$$cal 6 2015


Display the files and directories

-


-


-


-


-


-


-


-



本文更新与2021-02-12 23:42,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/646605.html

unix复习文件终极版.doc的相关文章