Common linux commands,
In linux systems, commands must be frequently used, and some commands may not be remembered, so it is very troublesome to search for them on the Internet. So here I will record the commonly used commands, and I will add new commands in the future.
1. cd command
1 cd document/test # enter 2 cd .. # Under the document/test directory based on the current directory to return 3 cd ~ # Return the root directory
2. ls command
-L: Lists long data strings, including object attributes and permission data.-a: lists all objects, together with hidden objects (beginning. -d: only list the directory itself, rather than list the file data of the directory-h: The file capacity is more readable (GB, kB, etc) column-R: It is listed together with the sub-directory content (recursively listed). It means that all files in the directory will be displayed.
3.tar command
Unpack: tar zxvf FileName.tar package: tar czvf FileName.tar DirName
More: http://www.blogjava.net/jiangjf/archive/2007/07/29/133122.html
4. cat command
Example file test.txt: cat test
Learn more:Http://www.cnblogs.com/perfy/archive/2012/07/23/2605550.html
5. chomd command
Chmod [-R] xyz file or directory
-R: recursive continuous change, that is, all files under the subdirectory will be changed.
Chmod 0755 file # change the file Permission to-rxwr-xr-xchmod g + w file # Add the user group writable permission to the file Permission.
More: http://man.linuxde.net/chmod
6. vim command
Vim test # If the test file exists, edit the file. If the test file does not exist, create a new one and then edit it.
To edit the test file:
1. vim test
2. Press I to enter the insert mode.
3. wq indicates saving AND EXITING
More: http://www.runoob.com/linux/linux-vim.html
7.