Linux Learning Notes (ii) file and directory management

Source: Internet
Author: User
Tags file copy

1, absolute path "must be the root directory/write"; The relative path "is not/write".

2. Special catalogue has.,..,-,~,~account, need attention.

3, directory-related commands have cd,mkdir,rmdir,pwd and other important commands.

4, rmdir can only delete empty directory, to delete the non-empty directory, you need to use the "rm-r" command.

5, the user can use the command is based on the path variable specified by the directory to find.

6, different identities (root and general users) the system default path is not the same. The big difference lies in/sbin and/usr/sbin.

7, LS can view the properties of the file, note-d,-a,-l and other parameters.

8, the file copy, delete, move can use CP,RM,MV and other commands to operate separately.

9, check the contents of the file (read the file) can use the command including Cat,tac,nl,more,less,head,tail,od and so on.

10, Cat-n and NL can display line numbers, but by default, blank lines will not be numbered and different.

11, the purpose of touch is to modify the file time parameters, but also can be used to create an empty file.

12. There are three time parameters for a file record, which is access times (atime), status (CTime), modification (mtime), and LS mtime is displayed by default.

13, in addition to the traditional rwx permissions, in the Ext2/ext3 file system, you can also use Chattr and lsattr settings and view hidden properties. Common +a that include only new data and +i properties that are completely unable to change the file.

14. When creating new files/directories, the default permissions for new files are regulated using Umask. The default directory full permission is drwxrwxrwx and the file is-rw-rw-rw-.

15. When a file has special permissions for suid, it means that when the user executes the binary, the user temporarily has permission to the program owner during execution.

16. When the directory has special permissions for Sgid, the new file user group that represents the user under this directory will be the same as the user group name for that directory.

17, the directory has the special permissions of Sbit, the user created files on behalf of the directory only their own and root can be deleted!

18. View the type of the file can be viewed using the files command.

19. The full file name of the lookup command can be which or type, both of which find the file name through the PATH variable.

20, to find the full file name can use Whereis or locate to the database file to find, and not actually find the file system.

21, using Find can add many parameters to directly query the file system, to obtain the name of the file you want to know.

Linux Learning Notes (ii) file and directory management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.