IV. Exercises
1. If the command line and restart the linux operating system?
reboot
2. How quickly delete the contents of the cursor before / after the command line?
前:ctrl+u 后:ctrl+k
3. How to delete the / tmp file all begin with A's?
#rm -f /tmp/A*
4. The system need to back up important files, how to / etc / passwd backup to the / tmp directory?
#cp /etc/passwd /tmp/
5. How to view the system created last three users?
#tail -3 /etc/passwd
6. What command can count the number of accounts in the current system, a total of?
1).#wc -l /etc/passwd
2).#cat /etc/passwd|wc -1
7. How to create /tmp/test.conf file?
#touch /tmp/test.conf
8. How to open /tmp/test.conf by vim editor?
#vim /tmp/test.conf
9. How do I see / etc / passwd the end of the first three rows and three lines?
(头).#head -3 /etc/passwd
(尾).#tail -3 /etc/passwd
10. How to create a one-time directory / text / 1/2/3/4?
#mkdir -p /test/1/2/3/4
11. The quickest way to return to the current user's home directory?
#cd ~
12. How do I see / etc occupied disk space
#du -sh /etc
13. How do I delete all the files in / tmp?
#rm -rf /tmp/*
14. Try to start Apache service, and check for a successful start.
#service httpd start
#ps -ef|grep httpd
15. Use the command has learned to kill the Apache process
#killall httpd