skip to Main Content

I have a directory which contains the following folders.

How do I use cd command to go to folder which contains Intelligence in its name using regular expression?

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

2

Answers


  1. cd *Intelligence*
    

    would take you to the directory that first matches this pattern.

    Like if there are directories “1 Intelligence”, “abc Intelligence” and “bcd Intelligence” in your current directory, it will switch to “1 Intelligence” because it is the first match.

    Login or Signup to reply.
  2. You can do something like this cd *Intelligence*.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search