实用Linux命令
来源:互联网 发布:华夏幸福和知合控股 编辑:程序博客网 时间:2024/06/01 12:28
删除文件中的换行符号
cat test.txt|tr -d ‘\n’
删除size为0的文件
三种方法:
1.rm -i `find -size 0`
2.find -size 0 -exec rm {} \;
3.
for file in * do if [ ! -s ${file} ] then rm ${file} fidone
方法1对一些文件名中有空格的情况处理不了,建议使用方法2.
重命名文件
平常用mv或者rename就可以重命名文件的,但是遇到了一种特殊的情况,文件是以换行符号开头的,并且文件的数量很多,这时可以用以下方法: rename 's/\n//' ./*
0 0
- linux命令实用命令
- linux Unix 实用命令
- linux若干实用命令
- Linux实用命令
- linux 实用命令
- linux 实用命令 小结
- linux实用命令收集
- linux 实用命令
- Linux实用命令集合
- linux实用命令汇总
- Linux 实用命令汇总
- linux 下实用命令
- Linux 实用命令汇总
- linux实用命令
- Linux 终端实用命令
- Linux常用实用命令
- linux实用命令
- 实用Linux命令 lsof
- JDBC连接Oracle数据库后实现对emp 表数据的增删改查
- app重签名
- Twisted学习(一)----------------------Deffered参考
- 内存映射mmap
- 浮点型数据存储方式
- 实用Linux命令
- 学习历程,数组,控制台输入数组并逆序输出
- 在GitHub上的Android开源代码SuperTextView的使用
- react异步方案实践
- 20161107学习心得
- 冒泡排序
- linux客户端与主机通信
- js 继承
- window.location.Reload()和window.location.href 区别