[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


find files with specific extensions

Posted on 2004-11-21
Medium Priority
Last Modified: 2013-12-15
How can i find files with specific extensions in current directory recursively? say i want to fine all txt files in /home/mydir/ then what is command?
I tried with locate but as it relies on database created from / i got lot of entries. and find gives me syntax error.
Question by:b123coder
LVL 36

Accepted Solution

grblades earned 100 total points
ID: 12638091
Hi b123coder,

find . -name '*.txt' -print

Expert Comment

ID: 12638137
find . -iname "*.txt"

Oh, I wasn't fast enough^^. Iname will make the search case insensitive.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
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 how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month18 days, 15 hours left to enroll

834 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