if we want to filter with sed pattern and just print the filtered lines without any further editing , we can do it like this

ls -a1 ~ | sed -ne "/^\./p"

This command will print all dir entries that starts with "."

ls -a1 ~ | sed -ne "/^\./p" | sed -ne "/bash/p"

I want to find meta files related to bash, so I got the result:

.bash_history
.bash_logout
.bashrc

we can view each file content by

ls -a1 ~ | sed -ne "/^\./p" | sed -ne "/bash/p" | xargs -n  less

delete file and directories except "term.sh" and "test.cpp"

ls | sed -e "/^term.sh$/d" | sed -e "/^test.cpp$/d" | xargs -n  rm -rf

show contents of all status file in current directory tree

find . -iname status | xargs -n  less

最新文章

  1. Linux环境下安装Oracle 10g 发生错误 You do not have permission to write to the inventory location
  2. dfs序 + RMQ = LCA
  3. cat命令在文件中插入内容
  4. 能不能对metronic继续封装一下呢
  5. vs2012出现无法启动iis express web 服务器的错误
  6. jQuery实现等比例缩放大图片让大图片自适应页面布局
  7. HDU 5619 Jam's store
  8. POJ 1631 Bridging signals & 2533 Longest Ordered Subsequence
  9. Struts国际化
  10. Java对文件的16进制读取和操作
  11. 彻底清除Linux centos minerd木马
  12. 最长单词(一星级题目) 本来是很简单的,其实就是加个flag
  13. AC自动机讲解
  14. javascript中的Date对象和Math对象
  15. LabVIEW(七):多态VI
  16. ubuntu16.04 离线安装nginx
  17. java 集合排序
  18. Android JNI与多线程
  19. selenium page object模式
  20. SQL 存储过程分页

热门文章

  1. Redis入门很简单之一【简介与环境搭建】
  2. Spring Cloud配置中心客户端读取配置
  3. Java-技术专区-虚拟机系列-内存模型(JMM)
  4. C++之循环体内变量
  5. celery使用的小记录
  6. 【hihoCoder】每周一题(从week 220开始)
  7. Jmeter的安装与环境配置
  8. jsp service bean
  9. MyBatis 通过包含的jdbcType类型
  10. 第十一次 LL(1)文法的判断,递归下降分析程序