Linux primary knowledge _03 - basic command system

Basic System Commands

   1 PATH environment variable
       echo the PATH $
   2 common commands
       date - to view the system clock
          is often used when the file name
          % F. 2019-8-26
          % D 08/26/19
          % H
          % m% M
          % S
        Clock hardware clock hwclock-- 
        cal look at the calendar
        hwclock -s // system clock with the hardware clock synchronization, clock synchronization for hardware
      extensions: ntp server
         yum install ntp
         to modify /etc/ntp.conf files, to achieve the client and server time synchronization;

 

     pwd cd
          . Contents: the current directory
             .. the parent directory
                ~ home directory
              - a directory
            basedname
            dirname
            PWD OLDPWD

     ls
          involves a lot of file attribute information
          -i inode information (file system-related)
          the -I file type file permissions (your main group belongs to other special permission bits) of hard links relevant to your main set of files (directory) size Mtime file (directory) name
          - plain text file
          d directory file
          l soft link is connected document file ------------------------------- character length
          s ------------------------------- socket file number of this device is the master device
          b block device file ----- -------------------------- number of this device is the master device
          c character device file stream file device
          p pipe file

      view files file specific file type
          plain text files are displayed as ASCALL file
          start time information of view file
          touch -C modifying
          atime - access time - the time the file is read or executed
          mtime - change time - file status change time
          ctime - modify time - file contents are modified
       cat tac
          view the file contents
          cat can combine multiple lines of input redirection
             -n

  Other common command
       who w whoami view the current user login information
       whereis    
          view commands absolute path
          to view the man's help documentation path
       Which
       hatis
       the shutdown the HALT the init 6 reboot the init 0 poweroff
       the shutdown now // immediately shut down
       shutdown -r now // immediately restart
       shutdown 17 : 00 // off at the 17:00
       shutdown +5 // shutdown command five minutes after
       shutdown -c // cancel the shutdown command
          shutdown call is poweroff
       the HALT directly off --halt
       poweroff - will do the inspection process and powering down
       reboot - restart
       init 0 / init 6

Guess you like

Origin www.cnblogs.com/lzqitdl/p/11414017.html