December 1 MacOS System command line operation mode

Source: Internet
Author: User
Tags clear screen

One

1.CD Entering the catalogue

2.CD/Enter the root directory

3.cd.. Previous level Directory

4.CD ~ User's home directory

5.pwd viewing the current operating directory

6.ls view files or subdirectories under the current folder

7.ls-la to view hidden files or folders under the current folder

8.clear Clear Screen Instruction

9.mkdir Create a folder

eg. 1.mkdir/users/wangkaiyu/desktop/test

2.mkdir.. /desktop/test

3.mkdir ~/desktop/test (three kinds are in different directories)

10.RM-RF Delete Files (there are three different methods as well as mkdir)

11.RM Deleting a folder

12.CP Copy files/folders (can rename but original file name unchanged) CP Test1.doc. /test2.doc

13.MV moving File/renaming mv/users/wangkaiyu/desktop/test. /documents/wky

14.cat Viewing text files

15.man viewing command usage and parameters

Second, vi operation mode (input mode and instruction mode)

1. In input mode, press ESC to switch to instruction mode

2. In instruction mode, enter input mode by input instruction (I, A, O)

3. A after the current cursor is entered

4. o Add a row below the current line and enter in the new row

5. x Delete the character of the cursor

6. DD deletes the row of the cursor

7. yy copy a line to the Clipboard (NY copy several characters)

8. P to paste the characters in the Clipboard into the current line

9.: w save, but do not exit

Ten.: Wq Save and exit

One.: q! Do not save exit

December 1 MacOS System command line operation mode

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.