Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common commands of mac

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what are the common commands of mac. It is very detailed and has a certain reference value. Friends who are interested must finish reading it!

Create a folder

Mkdir folder name

Create a folder

Mkdir test

Create a file

Mkdir a.txt

Write content in the created file

Echo 'Hello Word' > a.txt

Edit the contents of the file

Vi file name (enter into the file)

Press I (enter edit mode)

Press esc to exit edit mode

Press: wq (Save edits and exit)

Press: Q! (exit without saving content)

View the contents of the file

For example: cat a.txt (cat is used to view files with less content)

For example: more a.txt (more is used to view files with more pages, press the space to realize the next page)

If the contents of the file are misspelled, there are two steps to correct them

1. Want to create a file with correct spelling

Echo 'Hello World' > newfil.txt

Echo 'Hello World' > newfile.txt

two。 Use the mv command to replace the misspelled file with the new file "mv old file new file"

Mv newfil.txt newfile.txt (actually overwrites the first file completely to the second file, and the first file disappears)

Permanent deletion

Rm-rf file name

Check what files are in the directory

Ls-lh

Show current directory path

Pwd

Clear the content displayed by the terminal

Clear

Wc counts the number of characters, words and lines of the file wc filename

Java-jar C:\ FireLine\ fireline.jar-soundC:\ Users\ Administrator\ Desktop\ doctor-ritual C:\ FireLineReport

The above is all the contents of the article "what are the common mac commands?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report