java autumn trick question Summary 1

1.linux common commands

0: Off
1: single-user mode, only the root maintenance
2: Multi-user can not use the File System NET
. 3: full multiuser
5: Graphical
6: Restart
usage is very simple init 0 can be shut down.

-h now the shutdown  : immediately shut down

sync  : the in-memory data written to disk (shutdown, are required to perform the sync before reboot)

who  or  W  : All Terminal

  • the Clear  : Clear the command line

  • the ifconfig  : display or set the card (ip check, etc.) (similar to the windows in the ipconfig)

  • -C 3 www.baidu.com of ping  : Baidu test the connection to this unit (3 shows a test -C 3)

  • -h df  : show disk space usage
    • the AUX PS | grep Firefox  : Firefox acquisition process ID (PID) (see process can take up cpu, memory and process the percentage of the trigger path instructions)
    • kill -9 process ID  : Forced to kill the process
      • cd -  : return to the previous directory
      • cd /  : Returns the root directory (absolute path)
        • dir1 mkdir  : create directory (dir1) (mkdir make directory as an abbreviation of)
        • -p ./dir1/dir2 mkdir  : create directories recursively (-p: When a parent directory does not exist, while building)
        • a.txt Touch  : Create a file a.txt

          rm: can delete a directory of one or more files or directories can also be a directory and its subdirectories subordinate all files are deleted; Syntax: rm (Option) (parameter) (Note: if parameter contains the directory, you must add the -r option);

        • rm file  : Delete file
        • rm -r directory or file  : delete the directory (and all the files in the directory) (non-empty can)
        • rm -rf directory or file  : Force delete, such as: rm -rf * to delete all files in the current directory
          • -t ./test a.txt b.txt Music Videos  : moving a plurality of files to the directory

            cp: copy files or directories; CP copy command to a single or multiple files already exists in the directory;
            common: cp -ai target directory files or directories;

          • -ai CP / opt / abc / opt / git /  : Copy abc directory (or file) to the directory git (option attribute file is also represented by a copy, copy all files in the directory; I ask a front cover)

        • chmod [-R] 777 file or directory  : Set permissions (chmod a + rwx a = chmod ugo + rwx a = chmod 777 a)
        • aptitude install software  : Install the software (recommended in this way installation)
          • -zxvf a.tar.gz -C ./test the tar  : tar.gz to extract the directory of the current test

Guess you like

Origin www.cnblogs.com/jiexing/p/11627275.html