search for files in a directory hierarchy

learn more… | top users | synonyms

14
votes
5answers
24k views

How do I find (or exclude) all directories and sub-directories matching a certain pattern (in Linux)?

I'm trying to use the Linux find command to find all directories and sub-directories that do not have .svn (Subversion hidden folders) in their path. I can only get it to exclude the actual .svn ...
1
vote
2answers
407 views

Unable to change the font in bold to yellow font in Less

Problem: to change the bolding which affects the word "expression" to the color yellow in Less: My commands which affects Less export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking export ...
10
votes
9answers
5k views

How do I master the UNIX find command?

I think I am fairly advanced in my use of find but EVERY time I use it I cannot for the life of me remember the method to close the -exec option. I spend a good deal of time reading every time I use ...
3
votes
1answer
3k views

Get all extensions and their respective file count in a directory

Getting all extensions for a directory: easy. Getting file counts for a particular extension: easy. But getting all file extensions and their respective file counts is alluding me. eg. + dir + ...
6
votes
2answers
2k views

find command default sorting order

what is the default sorting order for entries returned by the linux find command? For example, if I issue find . -type f -name '*mp3' and the output consists of multiple files across multiple ...
5
votes
10answers
3k views

Find Sniffer on LAN

HI, What tools or techniques are available for *nix and Windows that help in finding if someone else on the LAN is using a sniffer? Having said that and strongly considering that there are tools out ...
2
votes
2answers
309 views

How do i use the {} operator in find execution inside exec

I tried this bash command: find /var/www/ -path '*wp-admin/index.php' -exec mv {} $(dirname {})/index_disabled But the second {} is not executed. It results in just ./index_disabled instead. How ...
5
votes
2answers
3k views

How can I handle spaces in file names when using xargs on find results?

One of my common practices is to perform greps on all files of a certain type, e.g., find all the HTML files that have the word "rumpus" in them. To do it, I use find /path/to -name "*.html" | xargs ...
5
votes
2answers
666 views

List directories not containing a file

I've seen similar questions to this, but nothing I can find related directly to files. Is there any way to give me a list of directories which do not contain a specific file? Example: /dir1/good ...
2
votes
3answers
394 views

List all symbolic links on a directory

a short question: is it possible to list all symbolic links onto a directory other than running a find over the whole filesystem? Background: I have a directory containing a lot of different versions ...