Document and Directory Management focus

Source: Internet
Author: User

  • Absolute path: "Must be from the root directory/write"; Relative path: "Not/write"
  • Special directories are:.,..,-, ~, ~account need attention;
  • Directory-related commands are: CD, mkdir, RmDir, PWD and other important commands;
  • RmDir can only delete empty directories, to delete non-empty directories need to use the "rm-r" command;
  • The commands that the user can use are searched according to the directory specified in the PATH variable;
  • Different identities (root and normal) system default PATH is not the same. The difference is greater in/sbin,/usr/sbin;
  • LS can view the properties of the file, especially the-D,-A,-l and other options are particularly important!
  • File copy, delete, move can be used separately: CP, RM, MV and other commands to operate;
  • Check the contents of the file (read the document) available commands include: Cat, TAC, NL, more, less, head, tail, OD, etc.
  • Cat-n and NL can display the line number, but by default, the blank line will not be the same number;
  • The purpose of touch is to modify the file's time parameters, but can also be used to create an empty file;
  • There are three time parameters for a file record, which is access times (atime), status (CTime), modification (mtime), and LS is mtime by default.
  • In addition to the traditional rwx permissions, in the Ext2/ext3 file system, you can also use chattr and lsattr to configure and observe hidden properties. Common +a that include only new data and +i properties that are completely unable to change the file.
  • When new files/directories are created, the default permissions for new files are regulated using Umask. The default directory full permission is drwxrwxrwx and the file is-rw-rw-rw-.
  • When a file has special permissions for suid, the user temporarily has permission to the program owner when the user runs the binary program.
  • When a directory has special permissions for Sgid, the group of files created on behalf of the user under this directory will be the same as the group name for that directory.
  • When a directory has special permissions for Sbit, the files created by the user in that directory are deleted only by itself and by Root!
  • The type of the observed file can be observed using the files command;
  • The full file name of the search command can be either which or type, both of which are searched through the PATH variable for the file name;
  • The full filename of the search file can be searched using Whereis or locate to the database file without actually searching the file system;
  • Find can add many options to directly query the filesystem to get the file name you want to know.

Document and Directory Management focus

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.