Thursday, 18 July 2013

Using find command to search for a particular directory in unix

I was looking for a particular directory today on my computer and I didn't know how to do it. After spending some time searching for it, I found the following command:

find [parent directory] -type d -name [directory name]

So in my case:

find /home/vader -type d -name wrapper_scripts

Optionally you can also use:

find /home/vader -type d | grep wrapper

1 comment:

  1. find . -type d -name [directory_name] # find everything from your current directory shorter than typing the whole lot.

    ReplyDelete