Brother Bird's Linux private dishes (Notes)-File permissions and directory configuration

Source: Internet
Author: User

The first part of Linux simple command operation
first, the basic command
1, display date and time: date;
2. Display Calendar: Cal
3. Easy to use calculator: BC
Enter the number and budget symbol directly, press entry, enter quit to leave the BC interface
second, the important hotkey
1, it has the function of command completion and file complement: Tab Eg:ca[tab][tab]
[Tab] is followed by the first command of a sequence of commands, then "command completion"
[Tab] is appended to the second command of a sequence of commands, or "file completion"
2, interrupt the current program function keys: [ctrl]-c
3, on behalf of the keyboard input end, can be used to replace exit input: [ctrl]-d
third, online Help man page and info page
1, query command or the use of related files (description of the operation): Man Page:eg man Date
You can press the Q key to leave the man's environment
2, similar to the man page, provide a method of online Help: Info page
iv. Simple text editor: Nano
Input command: Nano text.txt
Whether or not the text.txt exists, it is open and does not exist.
Five, shutdown, System Status command
1, query who online input "who" command, query the network online status, enter the "netstat-a" command, query the background execution program, enter the "Ps-aux" command.
2. Data synchronously written to disk: Sync
3. Shutdown command: Shutdow
4, restart, shutdown command: Reboot, Halt, Poweroff

Part II file permissions and directory configuration for Linux
One, file properties
1. Detailed permissions and attributes for all files: Ls-al
2, change the file belongs to the user group: CHGRP (the group name to be changed must be in the Etc/group file memory.) Otherwise, it will go wrong)
3. Change the file owner: chown (user must be an account that already exists in the system)
4, change the permissions: chmod there are two ways to change the permissions of the file
A, Number type r:4,w:2,x:1
Eg:infor Original permission is drw-r–r– input command chmod 774. Local
Infor Permissions Change to drwxrwxr–
b, Symbol type file a 9 permission u for user, G for Group,o on behalf of other, and a for all, read and write permission can be written as r,w,x;+ representative join,-delegate removal, = representative settings.
File or directory
Eg1:infor Original permission is drw-r–r– input command chmod u=rwx,g=rw,x=rx infor
Infor Permissions to Drwxrw-r-x (note that there is no space in the middle of the U=rwx,g=rw,x=rx)
Eg2:infor Original permission is drw-r–r– input command chmod u-w infor
Infor Permissions Change to dr–r–r–
5. Copy files: CP source file Target file EG:CP. bashrc. bashrc_test
second, log in root
Method 1: Enter the command: sudo su then prompts to enter the current account (System first account) password, that is, log in root
Method 2: Enter the command: sudo-i
Exit Root: Enter command: Exit

Brother Bird's Linux private dishes (Notes)-File permissions and directory configuration

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.