第7章-02
来源:互联网 发布:股票网络销售话术 编辑:程序博客网 时间:2024/05/20 16:01
Please indicate the source if you want to reprint: http://blog.csdn.net/gaoxiangnumber1
mv: move (rename) files
取得路径的文件名和目录名称
直接查阅一个档案的内容
1.cat(concatenate files and print on the standard output)
2.tac( concatenate and print files in reverse)
3.nl - number lines of files
可翻页检视、资料截取:P216-P220
修改档案时间或建置新档: touch
三个主要的变动时间:默认的情况下,ls 显示出的是该档案的mtime。修改方法详见P221-P222
档案预设权限:umask(set file mode creation mask)。
在默认权限的属性上:
档案:预设没有可执行( x )权限,只有 rw,最大为 666 分,即-rw-rw-rw-
目录:x与能否进入此目录有关,因此默认为所有权限均开放,为 777 分,即drwxrwxrwx。
umask的四个数字中第一个数字是特殊权限用的,后三个数字指的是默认值需要减掉的权限(owner/group/others)。
设定umask:直接在 umask 后面输入 002(想设置的数字)
默认情况下:root的umask为002;一般用户的umask为002。
chattr - change file attributes on a Linux file system 配置文件案隐藏属性
lsattr - list file attributes on a Linux second extended file system
档案特殊权限: SUID, SGID, SBIT:P227
观察文件类型:file
which - locate a command 寻找『执行档』
whereis
- locate the binary, source, and manual page files for a command:寻找特定档案
locate - find files by name(最好用)
locate是经由数据库来搜寻的,而数据库的建立默认是在每天执行一次(每个 distribution 都不同),所以当你新建立起来的档案, 即还在数据库更新之前搜寻 该档案,那么 locate 会告诉你『找不到!』。手动更新 locate 数据库:直接输入 updatedb(可能会等待数分钟的时间)。updatedb:根据 /etc/updatedb.conf 的设定 去搜寻系统硬盘内的文件名,并更新/var/lib/mlocate 内的数据库档案;locate:依据 var/lib/mlocate 内的数据库记载,找出用户输入的关键词文件名。
find - search for files in a directory hierarchy
Please indicate the source if you want to reprint: http://blog.csdn.net/gaoxiangnumber1
- 第7章-02
- 第1章 第7题
- 第3章 第7题
- 第4章 第7题
- 第7章 第1题
- 第7章第1题
- 第7章第2题
- 第7章第3题
- 第7章第4题
- 第7章 第2题
- 第7章 第3题
- 第7章 第4题
- 第7章 第5题
- 第7章 第6题
- 第7章第5题
- 第7章第6题
- 第10章第7题
- 第02章
- 第7章-01
- 汇编中的所有寄存器类型与作用
- 面试题:正整数序列Q中的每个元素都至少能被正整数a和b中的一个整除,给定a和b,需要计算出Q中的前几项
- 带分区的省市区字典数组
- linux相关术语
- 第7章-02
- hdu 5327 Olympiad(水)
- [Leetcode]Reverse Integer
- Linux守护进程设计
- 产品经理在外包项目时如何踩更少的坑
- [Vijos]P1398 奖学金
- 如何去掉wordpress默认插入图片链接
- hihocoder Beautiful String
- 2.工厂模式(简单工厂模式,工厂方法模式,抽象工厂模式)(设计模式笔记)