Snow Cake August 2 notes

  [TIC / IP architecture - Protocol Overview (Figure)]
   

 Comment:   

                      ssh --- do remote link; tftp --- do remote transmission; smtp, pops, imap --- mail management and transport;
                      dns --- DNS; UDP --- protocol data unit (voice); ICMP - - ping tool

               
 A query help

 

                             <1> A \ Help
                             <2> command classification:
                                                    1, internal command
                                                                  {} the Command Help
                                                     2, an external command
                                                                  {the Command - Help (-H)}
                             <. 3> B \ Man
                                                man the Command
                                                           \ downwardly for the specified content ( ubuntu)
                                                                      {n-lookup downwardly}
                                                                      {} N Find upwardly
                                                          ? Find specify the content up
                                                                        the n-N
                                                            q quit
                            <4> Baidu Google
                                                Baidu
                                                       command {view files in Ubuntu What? }

 Commonly used commands:

                     . 1, cat display content from the first row, and all content output

                           cat features: successive file on the screen of the content output from the first row. But the cat is not commonly used, because when the file size, number of rows relatively long time, the screen can not accommodate all, can only see part of the content.

                           cat Syntax: cat [-n] file name (-n: display, even with the output line number)

                      2, less window size according to the display contents of the file, a page

                            can use less pageup [] and [] key pagedown page forward and page

                            less syntax: less filename


 {Ls how to use in Ubuntu? }

s command under linux is one of the most commonly used commands, dir ls command with the same dos is used to list files in the directory, the following is the use ls:

                                                                         ls -a list all files in the file, including the "." At the beginning of the hidden files (linux file under the hidden files are. at the beginning, if there is .. on behalf of the existence of the parent directory).

                                                                         For more information about the file ls -l lists, such as the creator, creation time, read and write permissions list of files and so on.

                                                                         ls -F at the end of each file with the file type of the character described. "@" Symbolic link "|" represents FIFOS, "/" indicates a directory, "=" represents a socket.

                                                                         ls -s print out the file size of each file in the back. size (size)

                                                                         ls -t Time to sort the file (time) time

                                                                         ls -A List files except "." and ".." in.

                                                                         ls -R file directory under all subdirectories are listed, the equivalent of our programming "recursive" to achieve

                                                                         ls -L lists the name of the file link. Link (Link)

                                                                         ls -S size of the file to be sorted                                                             

                                                      
Two, Linux directory structure 1, the directory structure under Windows
 

                                    

2, Linux (ubuntu) directory structure
                                     
  tree; all files from the root;
                                        (/ etc / fstab - boot automatically mount) on disk partitions and mount command
                                                         df - h to view the disk mount case
                                                              [dd if = / dev / zero of = / root / image bs = 1024k count = 100 // create a loopback device (virtual disk)]

                                                         fdisk  【磁盘文件】 -- 做磁盘分区;
                                                                 sd  --  scsi 类型的磁盘 ( hd IDE )
                                                                 a  --   第一块磁盘( b、c、d    ...)
                                                                 1  --  第一个分区( 2、3、4  ... )
                                                         mkfs  --  格式化 (创建文件系统)
                                                         mount  --  磁盘挂载
                                                         umount  --  将磁盘卸载下来
 3、Linux的主要目录
                                     /  (根目录)
                                                            / bin     存放命令文件
                                                            / boot   存放系统启动文件(内核、grub程序)
                                                            / cdrom  光盘目录
                                                            / dev   存放设备文件( c字符设备、d快设备)
                                                            / etc   大部分的系统配置文件
                                                            / home   普通用户的家目录
                                                            / lib   / lib64   库文件 ( .so 结尾的文件)
                                                            / lost + found   非正常关机下的碎片文件(空磁盘挂载上来,默认就会有这个目录)
                                                            / mut   / media  专门提供挂载的挂载点
                                                            / opt   第三方软件的安装目录
                                                            / proc  / sys  进程、系统目录(默认是空的,只有启动才会存放对应进程和系统文件)
                                                             / root   root用户的家目录
                                                             / sbin   存放命令的目录
                                                             / tmp   临时文件存放目录
                                                             / usr    常见软件安装目录
                                                             / var    文件会随时更改的目录

三、目录的常见命令

1.查看目录内容

     终端使用技巧:自动补全

ls 查看文件内容;

2.搜索使用过的命令

ls  文件通配符:*--任意长度的任意字符

                        ?--任意一个字符

                       []--取值范围(只取范围中的一个字符)

                      ^--托字符,指定以某个字符开头

                       $--以什么字符结尾

       grep命令---行过滤

          查看文件中的匹配,过滤某一行:

          -v   反选   ^$--空白行

          -i  忽略大小写

2.切换目录

cd

常见特殊目录

   ./  ..  /  ~  /  -

绝对路径

从根开始写,写全了;

相对路径

相对当前路径而言,你所要处理的目录

 

Guess you like

Origin www.cnblogs.com/caoliyuan/p/11289800.html