Embedded Basics-C language (1) common commands for the-vim editor

Source: Internet
Author: User
Tags clear screen control characters file copy string to file

[1][email protected]:~$[email protected]: User name @ computer name      ~: Home directory      $: prompt [2] open terminal       ctrl+shift+n: Open as current directory       ctrl+alt+t: Open terminal default home directory [3] ls browse directory      ls  -a     Browse all files, including hidden files, hidden files to "." Start      ls  -L     list display          -H     display size, K, M, G[4] Touch   Create file        echo "Hello World" >> test.txt     write string to file     &NBSP ; Cat   test.txt       Output file contents, display  [5 on terminal mkdir   Create folder [6]  cd   file name     &NBS P       Switch working path (switch directory)        CD &nbsp ... /      switch to the previous table of contents         CD  ./        to switch to the current directory. No changes        CD             Switch Home catalogue,/home/linux        CD  /        switch to the root directory, which is equivalent to Windows C drive, do not operate it        CD   ~       Switch home directory        CD  -        Execute last CD instruction &NBSP ; [7] Clear or ctrl+l     clear Screen
[8] PWD     Get current position, absolute path [9] CP   Source file path   target file path       file copy     &NBSP;CP  dir 1     DIR2    -R      -r recursive copy file [ten] MV   file's mobile   file rename       &N BSP;MV   Source file path   destination file path             Mobile       &NBSP;MV   source file &nbs P     target file                 Rename [one] rm   Delete       &NBSP;RM &NBSP;-RF     Force delete       &NBSP;RM  *.txt     Delete all txt files [12] Create a shared folder    &NB Sp     CP  -r   source files    /mnt/hgfs/share               from Linux copy windows        CP  /mnt/hgfs/share/test.txt  ./                Use from Windows Copy to linux   [13] VI          ESC   to switch between modes   & nbsp   &NBSP 1-command line mode              yy                 to copy one line &nbsp ;           NYY               copy n line         &NB Sp  :3,5y           copy 3-5 line             p       &NBS P           Paste the next line of the cursor            PPaste DD on the previous line of the cursor delete row ndd delete n rows: 1,7d delete 1-7 rows U undo Action Ctrl+r Anti-undo Operation 2-insert mode I insert in front of cursor IInsert a at the beginning of the line inserted after the cursor AInsert o at end of line insert next row of cursor O   Insert the previous line of the cursor         3-bottom line mode            : Wq     Save and Exit & nbsp;           : q!       Do not save forced exit            : w       save       &NBSP ;    : x         Save and exit  [14] program             #include <stdio. h>          //header file,<> header file is System-provided                 &N Bsp                          ,         &NB Sp                   "head.h" means that the header file is user-defined           &N Bsp int  main (void)                //int     represents the function return value, he must match with return data type                       &NBsp                                 main &nbsp ; program entry, one project only one main                            &NBSP ;                           void represents no parameters             {            printf ("Hello world\n"),    //printf outputs a string to the terminal. \ nthe newline            return 0,              //function return value &NB Sp          }  compilation:      GCC   hello.c           Default health a.out executable file Execution:      &NBSP;./A.OUT[15] computer data          1-numerical data       & nbsp  2-non-numeric data               &NBSP;ASCII Code table             &N Bsp;man &nbsp ascii               0x0~0x1f       32 control characters       &NBS P        0x20~0x7f     96 general characters                 ' &nbs ' P    --> 0                   SPACE-->32    &NBSP ;           ' 0 '  -->48                ' A '--&GT;65&NB Sp               ' A '--&GT;97&NBSP;[16]GCC compilation four steps             1-preprocessing                 GCC  - ETest.c-o test.i Header File expansion contains, macro substitution 2-compile gcc- STest.i-o Test.s Generating Assembly Files 3-assembly gcc-c Test.s-o TEST.O generation                Target file 4-link gcc test.o-o test build executable [+] G jump to end of file GG jumps to the beginning of the file ctrl+shift+ "+" expands Ctrl + "-" Zoom Out

Embedded Basics-C language (1) common commands for the-vim editor

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.