1. pwd shows the current folder you are working on.

2. Type cd / to go to the root dictionary.

3. Absolute route (cd /home/dq) vs. relative path (cd home).

4. Type whoami to check the current username.

5. Type cd ~ to go back to the user folder.( home directory)

6. Type mkdir test to create a driectory named test in the current directory.(mkdir have to type the full path of the directory)

7. -v is an opinion of a command, and the function is to show the detail of the command.

8. mkdir --help is to understand all the possible opinions of mkdir

9. ls is to show all the directory, ls -l is to show all the detailed directory.

10. We use rmdir to delete the dirtectory.

11. touch test.txt is to create a file named test.txt. touch command can also updata/modify files.

12. echo is like print in python

13. Standar stream does need to care about there is the input come from and where does the output go.

14. Use nano test.txt to edit the txt file.

15. Each file in unix has its scope: 1. owner 2. group 3. everyone. And each of them has its own  permissions: 1. read 2.write 3.execitve ( for a file, you can think it like I allow someone doing something. Of which someone is the scope, doing something is the permissions.)
16. this means that for user, we can write and read. For other users in this group can only read, for everyone can only read.

17. 

  We are using stat test.txt to show the authorization of the file. in the access section. we can see the number 0644 which shows the permission for user/group/everyone.

18. Typing chmod 0664 test.txt will give the owner read and write permissions. 

19. move file: mv test.txt test

  copy file:cp test.txt test2.txt(copy file test.txt and paste to test2.txt)

20. Delete file with commend rs

21. Add sudo before every commend to run as root user.

 

 

 
 
posted on 2016-10-29 00:58  阿难1020  阅读(176)  评论(0编辑  收藏  举报