Improve company productivity with a Business Account.Sign Up

x
?
Solved

Linux Shell Scripting: Recursively loop through directories and files but skipping files beginning with dot

Posted on 2013-11-08
1
Medium Priority
?
1,521 Views
Last Modified: 2013-11-08
This processes all files recursively:
for f in $(find /path/to/qqq -type f)
do 
 echo File: $f
done

Open in new window

I want all files that begin with . such as .htaccess to be excluded.
0
Comment
Question by:hankknight
1 Comment
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 39634540
for f in $(find /path/to/qqq ! -name ".*" -type f )
do
 echo File: $f
done
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Can you run Linux on a Windows system?  Yep.  Here's how.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

606 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