Linux Study Notes-document

Source: Internet
Author: User

Linux Study Notes-query the properties of files through ls in files. query non-hidden files by ls. query all files by ls-al. The display structure is as follows: chgrp [-R] group name file name or directory. (Change owner group) chown [-R] Account name: group name file and directory (change owner) chmod permission file or directory (Change permission) in linuxthe File Permission limit can be executed for the permission limit X to decide, Windows is an extension name to decide, .exe ,. bat, com ....... linux permissions are irrelevant to the file name ~ ~. R (reader): Can read files w (writer): Can edit files, modify files, delete files x (execute): Execution files. Permission directory file r can read the directory. If only r does not have w, you cannot enter the directory to read the file content. create a new folder 2. delete a folder 3. change the folder name. modify the folder location 1. you can modify the file name. 2. delete file 3. can I modify attribute x to enter this folder? Can I execute this file and assume that the file has the --- permission, but the directory has the w permission to delete the file? You can delete files by deleting directories. There are two types of permissions: 1. digital code r: 4 (read permission) w: 2 (write permission) x: 1 (Execution permission) If you want rwx permission, 0 indicates -, 4 (4 + 0 + 0) represents r 3 (0 + 2 + 1) represents-wx ....... example: chmod 777 hello. java (the first 7 is the master permission, the second 7 is the group permission, and the third 7 is the other permissions) 2. character code: g (group): group permission. (Chmod g = rwx hello. java) grant rwx permissions o (others): others (chmod o + wx hello. java) Add the wx permission u (user) to others: chmod u-wx hello. java) grant the owner the wx permission a (all): all (chmod) a + r, og + w hello. java adds r permissions to all users and w permissions to the group and others. directory: pwd: display the current Directory cd: 1. cd-(equivalent to the last cd) 2. cd/and directory 3. cd ~ The current user directory 4. cd .. is returned to the upper-level directory (similar to the web directory ../) 5. cd ~ Xieyong enters/home/xieyong mkdir (create directory): 1. mkdir xieyong (create the xieyong directory) 2. mkdir-p xieyong/love/momo (recursively create xieyong/love/momo) 3. mkdir-m 777 xieyong (create the xieyong directory to give the permission 777,-m cannot be used with-p, otherwise it will become invalid) rmdir (delete directory): 1. rmdir xieyong (directly Delete the xieyong directory) 2. rmdir-p xieyong/xieyong (recursive deletion) $ PATH specifies the search address of the command. For example, if ls is placed under bin, path contains:/bin, in this way, the bin will automatically search for ls. Ls (common parameters): ls parameter [file name (current directory by default)] 1. -t dependent time sorting 2. -S file size sorting 3. -R recursive subdirectories are displayed together. 4. -a: Hide directory-. and .. 5. -l show the detailed information package (ll command is equivalent to ls-l) 6. -full -- time display time details, color: directory is generally blue Copy command: cp destination file copied to location 1. -p is assigned together with the archive attribute. 2. -I. If the target file already exists, do you want to overwrite the file? Tip 3. -r recursive replication (the-r option must be used to copy Directories) 4. -l create shortcuts instead of assigning values to this file. -effect of a on-pda 6. -d if the file is a shortcut, assign the shortcut content instead of the shortcut content.

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.