【shell】【10】文件处理
来源:互联网 发布:linux下源码安装mysql 编辑:程序博客网 时间:2024/06/06 10:01
1/ 列出文件
echo /bin/*sh
ls /bin/*sh
2/ 使用touch 更新修改时间
#creat a new file
touch file
#update time of file
touch file
3/ 寻找文件
locate file
locate '*file*'
4/ 寻找命令存储
#where is gcc?
type gcc
gcc is /usr/local/bin/gcc
type cd
cd is a shell builtin
5/ find指令
find -name 'file'
find
6/ 文件系统的空间信息
df -k
df -h
xiewen@ubuntu:~/shell/dir-test$ df -h文件系统 容量 已用 可用 已用% 挂载点/dev/loop0 19G 6.4G 12G 36% /udev 1.9G 4.0K 1.9G 1% /devtmpfs 385M 860K 384M 1% /runnone 5.0M 0 5.0M 0% /run/locknone 1.9G 18M 1.9G 1% /run/shm/dev/sda4 143G 22G 122G 15% /host/dev/sda6 196G 174G 22G 90% /media/本地磁盘/dev/sda5 77G 67G 11G 87% /media/本地磁盘_/dev/sda2 51G 47G 4.7G 91% /media/924C18204C180221/dev/sda1 100M 31M 70M 31% /media/系统保留
7/比较文件diff
#file one, two
xiewen@ubuntu:~/shell/dir-test$ cat oneaaaa eeebbbb
xiewen@ubuntu:~/shell/dir-test$ cat twoaaaa dddbbbbffff
xiewen@ubuntu:~/shell/dir-test$ diff one two1c1< aaaa eee---> aaaa ddd2a3> ffff
0 0
- 【shell】【10】文件处理
- shell脚本处理文件
- shell 递归处理文件
- shell中的文件处理
- shell处理文件
- shell常用文件处理命令
- shell 脚本读写处理文件
- shell实现文件处理详解
- 批量文件筛选处理shell
- shell学习9:文件处理
- linux shell基本文件处理
- shell按行处理文件
- shell命令批量处理文件
- 用shell处理上MB的文件
- linux shell 对两个文件的处理
- Shell 乱码 文件中的控制字符处理
- linux shell 循环处理文件夹每个文件
- shell脚本 文件合并 - 字符串处理
- 算法笔记--最短路径之SPFA算法
- hdu2838——Cow Sorting
- NodeJS 初学者学习推荐(原题 NodeJS常用模块推荐)
- UNIX网络编程卷1 回射服务器程序 TCP服务器程序设计范式 四个版本
- 加载UIImage的两种方式
- 【shell】【10】文件处理
- CodeForces 34D Road Map
- HDU1039 Easier Done Than Said?
- s3c2440 的 rtc 操作
- 堆
- 非多项式CRC16校验算法
- UVa 348 Optimal Array Multiplication Sequence (DP 最优矩阵链乘)
- linux shell
- The Python Conceptual Hierarchy