1. Internal command: Echo
To view the internal command assistance: help Echo or man echo
2. External command: LS
View external command help: LS--help or man ls or info ls
Type of 3.man document (1~9)
Man 7 Mans
Mans 5 passwd
4. Shortcut key:
CTRL + C: Stop process
CTRL + L: Clear screen
CTRL + R: Search History commands
CTRL + Q: Exit
5. Good at using the TAB key
--------------------------------------------------------------------------------------------------------------- -------------------------------------------
1. Access to User root directory
CD ~ or CD
2. View your current directory
Pwd
3. Access to the Itcast user root directory
CD ~itcast
4. Return to the original directory
CD-
5. Return to the previous level of the directory
Cd..
6. View all files in the Itcast user root directory
Ls-la
7. Create a Itcast folder under the root directory
Mkdir/itcast
8. Create SRC and webroot two folders under the/itcast directory
Created separately: MKDIR/ITCAST/SRC
Mkdir/itcast/webroot
Create at the same time: Mkdir/itcast/{src,webroot}
Go to the/itcast directory and create. Classpath and Readme files in this directory
Create each: Touch. classpath
Touch README
Create at the same time: touch {. Classpath,readme}
View all files under the/itcast directory
Ls-la
Create a Test.txt file under the/itcast directory and write to the content "This is test"
echo "This is Test" > Test.txt
Check out the contents of Test.txt
Cat Test.txt
More Test.txt
Less test.txt
Append write to Readme file "Please Read Me Me"
echo "Please read me a" >> README
Append test.txt content to the Readme file
Cat Test.txt >> README
Copy all files in the/itcast directory to/itcast-bak
Cp-r/itcast/itcast-bak
Go to the/itcast-bak directory, move the test.txt to the SRC directory, and modify the file name to Student.java
MV Test.txt Src/student.java
Create a struts.xml under the SRC directory
> Struts.xml
Delete all XML-type files
RM-RF *.xml
Delete the/itcast-bak directory and all files below
Rm-rf/itcast-bak
Go back to the/itcast directory and check the Readme file for multiple words, how many fewer lines
Wc-w README
Wc-l README
Go back to the root directory, pack the/itcast directory, and then compress with gzip
Step-by-Step Complete: TAR-CVF Itcast.tar itcast
Gzip Itcast.tar
One step complete: TAR-ZCVF itcast.tar.gz itcast
Unzip it, and then cancel the package
Step-by-Step: gzip-d itcast.tar.gz or Gunzip itcast.tar.gz
One step complete: TAR-ZXVF itcast.tar.gz
Package The/itcast directory, compress it with bzip2, and save it in the/tmp directory
TAR-JCVF/TMP/ITCAST.TAR.BZ2 Itcast
Unzip the/tmp/itcast.tar.bz2 to the/usr directory below
TAR-JXVF itcast.tar.bz2-c/usr/