我有一个包含以下文件夹的目录。
如何使用cd命令使用正则表达式转到名称中包含Intelligence的文件夹?
mac@saurav 6th Semester ->ls
[CE 655] Engineering Economics
[CT 651] Object Oriented Analysis and Design
[CT 652] Database Management System
[CT 653] Artificial Intelligence
[CT 654] Minor Project
[CT 655] Embedded System
[CT 656] Operating System
答案 0 :(得分:1)
cd *Intelligence*
将带您到最符合该模式的目录。
就像当前目录中的目录“ 1 Intelligence”,“ abc Intelligence”和“ bcd Intelligence”一样,由于它是第一个匹配项,它将切换到“ 1 Intelligence”。
答案 1 :(得分:1)
您可以执行类似cd *Intelligence*
的操作。