Section III File operations
- 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
- 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
- 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
- Copy file: CP (does not change file properties and permissions)
CP Source Archive target file
- 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.
- Switch directory directive: CD
- New empty file: Touch
"Book Notes" "Bird's-brother Linux private cuisine-Basic knowledge" section III File operations