在控制台下,如果想只列出当前文件夹下的目录,只要:
-d 属性只列出目录名称,而不列出目录中的内容,目录在控制台下的显示都以 “/“ 为结尾,所有的目录即为 “*/” 了。
当然,你也规定条件,比如,只列出 b 开头的目录:
如果你想列出隐藏目录:
如果你想统计目录数目,把结果传给 wc 即可:
剩下的大家自由发挥吧……
转自:
http://linux.byexamples.com/archives/314/how-to-list-just-directories-the-correct-way/
is-Programmer 是一个面向 Linux 爱好者与程序员的 Blog 系统,具有简洁的风格,方便的代码高亮和数学公式插入功能,适合撰写学习笔记和技术文档。
Host by is-Programmer.com | Power by Chito 1.3.3 beta
2022年6月21日 15:58
I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. Whisky Shop Near me
2022年9月03日 21:23
Glimpse upon the idea within a lot similar manner when you would likely in case you were being building an not online jacksonville seo small business, which will, as a way to become sucessful, needs responsibility plus a good approach from the particular canceled out, using short pay back while in the first days to weeks. https://www.simplybuzzes.com/angel-number-7766-meaning/
2023年9月08日 21:11
Acknowledges for paper such a beneficial composition, I stumbled beside your blog besides decipher a limited announce. I want your technique of inscription... Kissimmee Bed Bug Treatment
2023年9月13日 19:09
Very interesting information, worth recommending. However, I recommend this: Orlando Termite Control
2023年9月13日 19:11
I should say only that its awesome! The blog is informational and always produce amazing things. Oviedo Termite Control
2023年10月25日 17:11
On that website page, you'll see your description, why not read through this. Online CPA
2023年11月21日 02:27
You should mainly superior together with well-performing material, which means that see it: Best roofers in Winnipeg
2023年11月29日 18:21
Tax credit evaluation services. Section 179D Green Energy Incentive. Schedule a free consultation to find out if your company qualifies for the 179D Green Energy Incentive.
2023年12月05日 20:51
I exploit solely premium quality products -- you will observe these individuals on: Buy semaglutide New York
2023年12月13日 23:54
It is somewhat fantastic, and yet check out the advice at this treat. Enphase IQ-Combiner X-IQ-AM1-240-3-ES