当前位置:   article > 正文

Linux中的粘滞位及mysql日期函数

Linux中的粘滞位及mysql日期函数

 只要用户具有目录的写权限, 用户就可以删除目录中的文件, 而不论这个用户是否有这个文件的写 权限.

为了解决这个不科学的问题, Linux引入了粘滞位的概念.

粘滞位

当一个目录被设置为"粘滞位"(用chmod +t),则该目录下的文件只能由

一、超级管理员删除

二、该目录的所有者删除

三、该文件的所有者删除

[root@centos /]# rz

将windows的内容上传到Linux

sz

将Linux内容上传到Windows

 在Linux中如何更改文件的所属组?

Linux修改文件所属用户及所属组(详细)_修改文件所属用户和所属组-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/qq_41602468/article/details/117932520

  1. #当前日期
  2. select curdate();
  3. #now
  4. select now();
  5. #从现在往后70天
  6. select date_add(now(),interval 70 day);
  7. select NAME , datediff(curdate(),ENTRY_DATE) as 'entrydays' from tb_employee order by entrydays desc ;

  1. #case when then else end
  2. select
  3. NAME,
  4. (case WORK_ADDRESS when '北京' then '一线城市' when '上海' then '一线城市' else '二线城市' end) as '工作地址'
  5. from tb_employee;
  6. CREATE TABLE score(
  7. id int comment 'ID',
  8. name VARCHAR(20) comment '姓名',
  9. math int comment '数学',
  10. english int comment '英语',
  11. chinese int comment '语文'
  12. ) comment '学员成绩表';
  13. insert into score (id, name, math, english, chinese) values (1,'Tom',67,88,95), (2,'Rose',23,66,90), (3,'Jack',56,98,76);
  14. select
  15. id,
  16. name,
  17. (case when math >=85 then '优秀' when math >=60 then '及格' else '不及格' end) '数学',
  18. (case when math >=85 then '优秀' when math >=60 then '及格' else '不及格' end) '英语',
  19. (case when math >=85 then '优秀' when math >=60 then '及格' else '不及格' end) '语文'
  20. from score;

  1. create table user
  2. (
  3. id int primary key auto_increment comment 'id',
  4. name varchar(10) not null unique comment '姓名',
  5. age int check ( age > 0 && age <= 120 ) comment '年龄',
  6. status char (1) default '1' comment '状态',#默认为1
  7. gender char(1) comment '性别'
  8. ) comment '用户表';
  9. insert into user(name, age, status, gender) values ('tom1',19,'1','男'),
  10. ('tom2',19,'1','男');

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/802063
推荐阅读
相关标签
  

闽ICP备14008679号