- 论坛徽章:
- 0
|
ls -F | grep /$是什么意思 .
今天在搜索一个东东的时候发现了这个标题,那么大家知道是什么意思吗?
ls -F的意思是把文件按照类型归类,并且在末尾加上/ *等符号标识
| 管道输出,把前面命令的结果当做输入传给后面的命令
grep /$的意思是从中挑出以/结尾的行,/就是标识是目录
- -F, --classify
- append indicator (one of */=>@|) to entries
复制代码 例子:- [root@SOR_SYS ~]# ls -F
- 1.sh* CC_manual_0701.rar gzpackage/ man.config script/ tr1.txt
- 2005.03.01 dead.letter index.html ntpd-deploy.sh* start_tomcatServer229-1.sh tr.txt
- anaconda-ks.cfg Desktop/ install.log printc.sh start_tomcatServer229-2.sh usr/
- apache-tomcat-6.0.30.zip etc/ install.log.syslog rpmpackage/ stop_tomcatServer229-1.sh zy/
- camptocamp-tomcat-0.0.1/ get_date.sh lib/ ruby-1.8.7-p248/ stop_tomcatServer229-2.sh zy.bak/
- [root@SOR_SYS ~]#
复制代码 如果我们搜索以/结尾的,我们可以用以下方法:
ls -F|grep \/【转义字符】
ls -F|grep /$
ls -F|grep / |
|