Appendix:UNIX common commands
============================================================================
1. CD Change working directory
2. pwd Output The absolute path of the current working directory
What commands to execute in UNIX, be sure to know your current working directory
3. ls view file
$ ls display file
$ ls-a Show All Files
$ ls-l List display file
$ Ls-la list shows all files
4. Touch is used to change the file access and modification time of standard UNIX programs, also used to create new files
$ Touch Test.txt
Note:touch does not modify the test.txt content, only changes its access, modification time, if test.txt does not exist, it will be created
5. Cat continuously view file contents
6. more Paging to view the contents of the file
Tips:
1> add spaces between commands and parameters
2> If you want to use the file name in the current directory, press the TAB key to complete the input in half
Defaults write Com.apple.finder appleshowallfiles Yes && killall finder//Show hidden files
Defaults write Com.apple.finder appleshowallfiles no && killall finder//Do not show hidden files
Chflags hidden *.txt //Hide all files with the suffix. txt
Chflags Nohidden *.txt//display all files with a. txt suffix
CONTROL + u//Clear one line
CONTROL + L//clear screen
MAC OS x Common Commands Summary