Linux basic commands and use

First, the computer performance

        1, scale: Cluster (strength in numbers)

              Clusters: 1) load balancing cluster

                         2) High Availability Cluster

                         3) High Performance Cluster (application layer) --- the Hadoop cluster = Mad reduces + HDFS

          2, longitudinal expansion: application migration (not recommended)

Note: Under Linux, everything is a file;

Second, the system start

             1, the power supply (BIOS chip)

                   1) Power On Self Test: Check the hardware device is working properly;

                   2) Start system: a reading order problem where the position of the system (BIOS):. Hard disk, network (PXE), U disk, CD / DVD ...

                                           . B required system files on your hard disk, loaded into memory, so the CPU reads and runs;

                                               MBR partition (BootLoader): it is used to boot the system to find and load;

                                               MBR partition (BootLoader): LILO;

                                               MBR partition (BootLoader): grub: into a first stage and second stage 1.5 

                2. At this point, the kernel has been loaded, but it does not use common applications --- kernel;

                3, the first application to use --- init

                      init: The operating system is divided into 0-6, a total of seven levels; each level will use a corresponding application; (specify the default boot level)

                             1) reads the default level 3 (command line) - chkconfig, rc * d (each level required to start the process).

                                    (0  1  3  5  6)

                                    0: Off 1: single-user mode 3: Command Line 5: graphical interface 6: Restart

                             2) Restart the final step ----- rc.local (system start last read the file, the administrator may need to run the boot command to add here)

                  4, chkconfig role: Specifies the service, when the start-up or shut down at what level)

                       1) chkconfig -h --help: View Help

                       2) chkconfig --list: whether to start the process at all levels

                       3) chkconfig --level 345 Name <on | off>: Specifies the starting level

                   5, update-rc.d certain control program in the boot Ubuntu;
                         -f: Force force

                   6, chkconfig can On Ubuntu, the need to install;

Three, Linux command

     1, the Command [Option] [parameter]
             1) []: representatives bracket, optional; specify a particular command functions implemented;
             2) <>: object code of the command; if not added <> is not representative of omitted;
             3) long option
             4) short options: short options can be combined, and the long option can not be combined;

Fourth, the basic use of commonly used Linux commands

           1, echo $ PATH (environment variable) variable: some are named in memory only;

            Question: If the command is no longer the PATH, how to solve?

 

                1) an absolute path to run this command to;
                     is the command itself absolute path of execution; and some named, is the system default alias (add your own) ---- Alias;
                     Which the Command: Find command absolute path
                     \ ls: backslash run directly;
                2) to add the path to the directory to the pATH;
                     pATH = $ pATH: / XXX / XXX

                     ls: Displays file information

                     -l: Detailed ll see the file (property)

                     -i: inode (attribute)

                    -h: human readable human

                    -F: behind the display file mark (used to distinguish the file type)

                    -r: reverse display file contents

                    -a: show all (parcels hidden files) file

            2, pwd: display the current path

                  1) $ pwd: there is a default environment variable

            3, cd: Switch to the target directory

                  1) to: the current user's home directory (/ root, / home)

                  2) .: current directory (with files beginning for hidden files)

                  3) ..: The current directory of the parent directory

                  4) -: $ OLDPQD: once through the store directory

            4, Touch: modification timestamp

                  1) Stat atime access time; mtime modify the contents of the file time; ctime modify file attributes

                  2)Touch a.txt

                       stat abc: display time

                       touch [parameters] ... file ...

                       touch -a abc

                  3) [[CC] YY] MMDDhhmm [.ss]: indicates the time of 20190801163622.

                       Such as: touch -at 201908011632.22 abc modification time 201908011632.22

                  4) -a: modify access time

                  5) -m: Modify modification time

                  6) -t: modified to specify what time

                  7) -c: modify the file Mtime, if the file does not exist, create the file

             5, Mkdir: Create a folder

               1) -p: create multi-level subdirectories recursively

               2) -v: detailed display creation process

                    tree: displays the directory, file tree view

                            a, -L NUM see how many level subdirectories 

                            b, -d display only the catalog file

                    tree /: View all listings

                    mkdir abc: Create a directory

              6, Rm: Delete Files

                      1) -f: force mandatory

                      2) -i: ask if this file is deleted, the default command (alias rm = 'rm -i')

                                  \rm abc

                                  /bin/rm abc

                      3) -r: delete the file directory

Expansion: 1) default does not apply in the case rm remove directories - rmdir (only delete empty directories)

           2) We will need to delete the file or directory to the / tmp directory can; the / tmp directory for temporary files directory, files not accessed for 30 days will be automatically deleted;

           3) If you have to delete some files, we matched up by find, and then delete the row;

                  find extension: find / -name abc | xargs rm

                                   find / -name abc -exec rm {}\;

 

Guess you like

Origin www.cnblogs.com/xiaoaqiqi/p/11285015.html