Commands that are commonly used under Mac:
LS column directory
LS parameter catalog name (parameter- W displays Chinese,-l details,-a includes hidden files )
mkdir Creating a Directory
Touch file (create file)
CP parameter file target file (parameter-R means everything under the Copy folder)
RM parameter file (parameter-RF Delete all things under this folder)
MV File Destination file (move folder)
Nano file name
VI file names are used to view the files they are not the same way to exit
Nano exit methods are ctrol+ corresponding help keys
VI Exit is all click ESC and then ENTER
: Wq after saving exit VI, if: wq! After forcing the store to exit (common)
: W Save but do not exit (common)
: w! If the file property is read-only, the archive is forced to write
: Q leave VI (common)
: q! If you have modified the file, do not want to store, use! Do not store files for forced departures.
: e! Restore the archive to its original state!
RmDir is to delete a folder
PWD shows the path of the current directory
Cat currently viewing files without entering edit mode OD can view non-text files
Cat and grep work with multiple cat file names | grep ' keywords '
File name (view file details)
Head-Number of rows file name to view the first few lines of the file
-
CD ~ Enter system home directory or Direct CD
CD-Go back to the last action directory
Cd.. /.. Switch to level two above
CD/Direct access to the system root directory
Common commands under Mac OS