"Book Notes" "Bird's-brother Linux private cuisine-Basic knowledge" section III File operations

Source: Internet
Author: User
Section III File operations
  1. File attribute Ls–al (the first character of the filename is. for hidden files)
    Number of connections: How many file names are connected to the secondary node (i-node)
    Display the full time format: "Ls-l–full-time"
    File type permissions:-rwxrwx-
    The first file type: D-directory directory;-Files; l-link file link files; B-accessible random access device; C Serial Port device
    R Readable, W writable, x executable
    第2-4 for file owner rights, 5-7 for group permissions, 8-10 for other people

  2. Change the group that the file belongs to: Chgrp users install.log the changed group name must exist in/etc/group.
    -R updates all files in the directory to this cluster

  3. Change file Owner: Chown (-r recursive processing, all files in this directory are changed)
    Chown [-r] Account name file or directory
    Chown [-r] Account name: Group name file or directory

  4. Copy file: CP (does not change file properties and permissions)
    CP Source Archive target file

  5. Change permissions: chmod
    chmod [-r] XYZ file or directory (r4+w2+x1 = 7) (XYZ is the sum of the values of the Rwx property)
    chmod u/g/o/a +/-/= r/w/x file or directory (User,group,others,all)
    Can enter a directory, which is related to the X permission of the directory. W allows users to delete, update, create new files or directories.

  6. Switch directory directive: CD

  7. New empty file: Touch

"Book Notes" "Bird's-brother Linux private cuisine-Basic knowledge" section III File operations

Related Article

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.