Create etags file of .c, .cpp, and .h files in all subdirectories

find . -regex ".*\.[cChH]\(pp\)?" -print | etags -
The regular expression matches patterns of .c, .cpp, .C, .Cpp, .h, .hpp, .H, .Hpp. The matched files are piped through etags to create a TAGS file, useful for emacs. Alternate regex (if you aren't worried about capital .Cpp) is -regex ".*\.c\|.*\.cpp\|.*\.h"

By: chidarste
2009-02-05 16:27:26

What Others Think

private investigator reno Wow! I did not know you can use ipad that way! This is interesting
yeoyeo · 36 weeks and 3 days ago
There are many commands that I become familiar with and I was able to get many of the ideas from here. Thank you so much for sharing this with me. Let me check out this one to know more. romania vps servers
zaiyamariya · 3 weeks and 6 days ago
Really unquie place, Thank you so much meant for posting The experience. Fantasticly penned report, anxieties most of folks given similar volume of material as you may, the online market place might be a a lot better put. Be sure to keep it up! astm level 2
KayGasaway · 1 week ago
Thanks with regard to publishing this type of excellent post! I discovered your site ideal for my personal requirements. It has fantastic as well as useful articles. Continue the great function! merchant services careers
jackson2321 · 6 days ago
If you are looking for more information about flat rate locksmith Las Vegas check that right away. news
KayGasaway · 2 days ago
A debt of gratitude is in order for posting this information. I simply need to tell you that I simply look at your site and I discover it exceptionally fascinating and educational. I can hardly wait to peruse bunches of your posts. compartir video de youtube en Instagram
jackson2321 · 2 days ago
Prophet Climate Ministries provides free online prophetic words to help you get rid of frustration, demonic attack, oppression, financial crisis, and more. live prophetic prayer line
KayGasaway · 4 hours ago
This is extremely fascinating substance! I have completely delighted in perusing your focuses and have reached the conclusion that you are right about a hefty portion of them. You are extraordinary.  luxury car rental
jackson2321 · 42 minutes ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: