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 ...
23
votes
8answers
46k views

how to find out mac addresses of all machines on network

Is there some easy way to find out mac address of all machines on my network rather than doing an SSH into each and ifconfig | grep HWaddr if there are 300 machines on network I really need some easy ...
2
votes
2answers
423 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 ...
11
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
4k 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 + ...
7
votes
2answers
3k 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
2answers
4k 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
10answers
4k 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 ...
3
votes
2answers
639 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 ...
2
votes
2answers
79 views

Running “find” command generates high load

I run this command on a Debian server with SSD drives configured as RAID 1: ionice -c 3 find . -type f -amin -1440 -mmin +1441 -not -path custom/ -print0 on a path which contains over 1.7M files and ...
2
votes
2answers
9k views

rsync only files created or modified after a date and time

The goal is to rsync (or using any other tools that give the desired result) only files that are created or modified after a date. It should work with filenames containing spaces (and/or other ...
5
votes
2answers
849 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
395 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 ...