Linux---facl and terminal

Source: Internet
Author: User

File system access Control list:
Facl:filesystem Control List
Save additional access control permissions with file extensions
Setfacl
-M: Settings can be set on the user or group
U:uid:perm
G:gid:perm
setfacl-m [D: directory]U:MYGROUP:RW file name
setfacl-m [D: directory]G:MYGROUP:RW file name
-X: Cancel
U:uid:perm
Setfacl-x u: Group name File name
G:gid:perm
A few common commands:
1, WhoAmI
2. Who
-R: Displays the current run level
-S: Ignore
-H: Show Column Line
W.H.O. | Gerp Leo
3, W
4. Last
Display/var/log/xtmp file showing user login history and System restart history
-N #: Displays information about recent # times
5, lastb,/var/log/btmp file, display user error login attempt
-N #:
6, Lastlog: Show each user the last successful login information;
-u Username: Displays recent login information for a specific user
7, BaseName:
8. Mail
-S: Indicates "title" in command line status
Cat/etc/fstab | Mail-s "Hello" root
9. Sleep Delay
10. Hostname: Gets the current host name
11, SEQ: The step in the loop SEQ 1 3 Results 1 2 3

Generate random Number:
random:0-32768
Random Generator: Entropy pool
/dev/random (Strict, safe, random number runs out will block)
/dev/urangdom (not strictly required)


Terminal type:
Console: Consoles
Pty: Physical Terminal ("the")
TTY: Virtual Terminal (VGA)
TTYs: Serial Terminal
pts/#: Pseudo Terminal

Shell






#! /bin/bash
#检查用户david是否登陆, check every 5 seconds to see David Log out of this script
DECLARE m=9
N= ' who | grep "Leo" | Wc-l '
for [$m-ne 0];d o
If [$n-eq 0]; Then
echo "Leo user logged in"
exit:0
Fi
Sleep 5
Done





Linux---facl and terminals

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.