Create a folder
mkdir folder name
Create a folder
mkdir test
Create a file
mkdir a.txt
Write the content in the created file
Echo ' Hello Word ' > A.txt
Edit File Contents
VI File name (enter the file)
Press I (enter edit mode)
Press ESC to exit edit mode
Press: Wq (save edits and exit)
Press: q! (Exit does not save content)
View File Contents
Example: Cat A.txt (cat to view files with less content)
For example: More a.txt (more for viewing more pages of files, press space can be realistic next page)
If the contents of the file are misspelled, there are two steps to correct
1. Want to create a correctly spelled file
Echo ' Hello world ' > Newfil.txt
Echo ' Hello world ' > Newfile.txt
2. Use the MV (move) command to replace the misspelled file with a new file "MV Old File New file"
MV Newfil.txt Newfile.txt (the first file is actually completely overwritten to the second file, the first one disappears)
Permanently delete
RM-RF file name
See what files are in the directory
Ls-lh
Show current directory path
Pwd
Clear what the terminal displays
Clear
Number of characters, number of words, and number of lines in WC statistics file WC filename
Java-jar C:\fireline\fireline.jar-s=c:\users\administrator\desktop\doctor-r=c:\firelinereport
This article from the "32 Krypton" blog, reproduced please contact the author!
Common MAC Commands