第7章-02
2015-08-12 22:23
337 查看
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
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
相关文章推荐
- Linux守护进程设计
- linux相关术语
- ASP.NET MVC验证标注的扩展-checkbox必选
- 原码, 反码, 补码 详解
- 汇编中的所有寄存器类型与作用
- hdu 5302 Connect the Graph(构造)
- Android学习笔记(二)
- 第7章-01
- solr学习
- Android 蓝牙低功耗Ble Gatt浅谈
- Lua1
- css图片响应式+垂直水平居中1
- 《清明上河图密码》:北宋的福尔摩斯探案,五星
- PXE网络装机配置和kickstart 无人值守安装
- NSDate和NSString相互转换
- 从今天起,做个挖渠人
- 第一课 MongoDB 概述与安装
- 从今天起,做个挖渠人
- 面试题:(1)关于fork的问题
- 【一些事晚报】在线直播平台成下一个快播?