Linux命令chattr和lsattr
2017-05-18 16:28
232 查看
先看字面解释:
chattr:chattr - change file attributes on a Linux file system
lsattr - list file attributes on a Linux second extended file system
chattr命令使用方法:chattr [ -RVf ] [ -v version ] [ mode ] files…
[mode]部分由+-=和[ASacDdIijsTtu]组合的,用来控制文件的属性。
參数查看,运行man chattr或者man lsattr
用途列举:
1、禁止改动,加入用户属性
# chattr +i /etc/passwd
# lsattr /etc/passwd
会显演示样例如以下属性
----i------e- /etc/passwd
2、日志文件的保护:
# chattr +a /var/log/messages
chattr:chattr - change file attributes on a Linux file system
lsattr - list file attributes on a Linux second extended file system
chattr命令使用方法:chattr [ -RVf ] [ -v version ] [ mode ] files…
[mode]部分由+-=和[ASacDdIijsTtu]组合的,用来控制文件的属性。
參数查看,运行man chattr或者man lsattr
用途列举:
1、禁止改动,加入用户属性
# chattr +i /etc/passwd
# lsattr /etc/passwd
会显演示样例如以下属性
----i------e- /etc/passwd
2、日志文件的保护:
# chattr +a /var/log/messages
相关文章推荐
- chattr、lsattr linux的隐藏文件属性查看的命令
- Linux的chattr与lsattr命令详解
- Linux的chattr与lsattr命令详解
- [Linux]Linux的chattr与lsattr命令详解
- Linux的chattr与lsattr命令详解
- Linux的chattr与lsattr命令详解
- 在Linux中用chattr和lsattr命令管理文件和目录属性
- linux命令学习(48 49)-lsattr chattr
- 学习笔记(五)——chown,chmod,chattr,lsattr,suid,sgid,stick_bit,Linux搜索文件/命令,软链接,硬链接
- (转)Linux的chattr与lsattr命令详解
- Linux命令chattr和lsattr
- linux扩展隐藏属性 与 lsattr/chattr命令
- 学习笔记(五)——chown,chmod,chattr,lsattr,suid,sgid,stick_bit,Linux搜索文件/命令,软链接,硬链接
- 【Linux命令-文件管理类】chattr命令和lsattr命令
- Linux的chattr与lsattr命令详解
- Linux的chattr与lsattr命令详解
- 在Linux中用chattr和lsattr命令管理文件和目录属性
- (总结)Linux的chattr与lsattr命令详解
- Linux的chattr与lsattr命令