21, Mac common commands

Source: Internet
Author: User
Tags clear screen

  1. Set in preference settings
  2. A Mac operating system (shortcuts for self-surfing search)
  3. Shortcut: Command + TAB: Switch between different applications
  4. Command + ~ (anti-quote): Switch between the same application
  5. COMMAND + N: The application where the new cursor is opened
  6. Command + Q: End cursor where all applications are located
  7. Command + Space:
  8. Command + Space:
  9. Command + c/v/x/z: Copy, paste, clip, undo
  10. CTRL + L: Clear screen
  11. Two common terminal commands
  12. Command +/-: Increase/decrease terminal window
  13. PWD: View current operating Directory
  14. CD: Switch directory, format: CD + directory
  15. LS: View the content contained in the specified directory and view the current directory if you do not specify it. Format: ls + directory
  16. . Represents the current directory: Represents the top level directory/representation root ~ (back quotation marks) indicates home directory-(bar number): Indicates the last working directory
  17. Operation of the folder
  18. Create folder: mkdir name
  19. Delete folder: Rm-r name
  20. Move (rename) folder: MV src (folder name) DST (folder name)
  21. Copy: Cp-r name directory father-> son-> gs cp-r son father (copy son to father) cp-r son/father (copy GS to Fathe R)
  22. Operation of the file
  23. Create a file: Touch file name
  24. Delete a file: RM file name
  25. Move a file: MV SRC DST
  26. Copy a file: CP file name directory
  27. Add: 1. Up and down button to view History command 2.tab button can complete the command 3. Clear screen
  28. Three using the VIM editor
  29. Enter View status (this status can be copied for file contents) Cat file name
  30. Used to view ASCII code instruction man ASCII press Q to exit
  31. Known as the editor of God edit files Vi/vim file name: 1.c 2.c
  32. Vim: There are three modes of operation: Normal mode, insert (edit) mode, view mode
  33. Into insert mode four ways: 1.a (insert from the back of the cursor) 2.i (inserted from the cursor) 3.O lowercase (insert a blank line from the next line of the cursor and enter the edit mode) 4.O uppercase (insert blank lines from the cursor line and enter edit mode)
  34. Save the edited file: First add colon and press W and press ENTER
  35. Exit Insert mode: ESC
  36. Save and Exit File: Add colon and press Wq last press ENTER shortcut key SHIFT + ZZ (save and exit)
  37. Do not save direct exit: Add colon and press q! last press ENTER
  38. Tall on command:
  39. Delete the cursor position and its following characters: Switch to normal mode by X
  40. Cursor setting first line: First switch to normal mode and double click g
  41. Cursor End line: Click G
  42. Cursor n rows: N Double-click G
  43. Cursor Header: Shift + ^
  44. Cursor end of Line: Shift + $
  45. Copy one line: YY copy n rows: Nyy
  46. Paste: P
  47. Delete (can clip):d D
  48. Delete N rows: ndd
  49. Undo Just Action: U
  50. Anti-undo: Ctrl + R
  51. View mode: Press ESC to exit insert mode and press V to enter view mode (or press V to enter view mode by normal mode)
  52. Bulk Modify Code format: Press V to enter view mode
  53. Press the up and down keys to select the code block you want to work with
  54. Around the whole move press shift+ ' < ' and ' > '
  55. Auto indent alignment Press ' = '
  56. Quad GCC compiler
  57. Format: Gcc-o Hello hello.c
  58. GCC Hello.c-o World
  59. GCC xx.c generate default file a.out
  60. Run:./file name

21, Mac common commands

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.