Solved

Unix Find Command

Posted on 2014-09-12
3
479 Views
Last Modified: 2014-09-12
I would like to do a search for a particular file, "program-nav" in the the current directory and all its subdirectories. I am not sure that the name is correct, so perhaps I would like do a search on all file names that have the word "program" in it, i.e., using the wildcard character. Can someone show me the quickest way to do it?

Thanks.
0
Comment
Question by:geeta_m9
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 40319991
find .  -type f -name "*program*"

If you don't know if it's uppercase or lowercase (or mixed) use the case-insensitive test "-iname" instead of "-name":

find .  -type f -iname "*program*"
0
 

Author Comment

by:geeta_m9
ID: 40320003
It worked like a charm, thank you!
0
 
LVL 9

Expert Comment

by:Trenton Knew
ID: 40320004
find / | grep program-nav

Open in new window

0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question