The find command in Windows systems is used to filter lines of input text, and return those matching the filter. The find command in *nix system is used to locate files or folders that match a certain criteria.

learn more… | top users | synonyms

0
votes
1answer
917 views

linux zip and tar all files with a specific extenstion recursively maintaining directory structure

Similar to this question and this question I'd like to make a single compressed tar file (files.tar.gz) that contains all the php files in my webroot and all it's subdirectories, maintaining folder ...
0
votes
2answers
560 views

How to search contents of files in folder?

In Win 7, how can I search for a word in the contents of all files in a specific folder. In XP this was easy. All you had to do was type the word into the "A word or phrase in file" text box on the ...
0
votes
1answer
65 views

using find command to find string that is not at the beggining or end of a line

So I know how to find strings in a filename that are at the end or the beginning of the line using the asterisk character accordingly. Problem is I can't find a way to find a string anywhere in the ...
0
votes
2answers
212 views

Use test to check for condition with find and execdir option

I think I can keep my question short. Why does the following command produce no output? find /usr/share/themes -mindepth 1 -maxdepth 1 -type d -execdir test -d {}/gnome-shell \; I expected it to ...
0
votes
1answer
138 views

linux find command issue

I have a shell script which was written for Mac OSX and now ported to a linux machine. I don't have access to a linux machine currently( I will be setting up a virtual machine soon) Some statements in ...
2
votes
2answers
151 views

Using “find” on mac doesn't locate .so files

For some reason "find" doesn't locate .so files unless they're in the same directory I'm in. For example: r-mbp:~ todd.r$ cd /usr/local/apache/modules/ r-mbp:modules todd.r$ ls httpd.exp libphp5.so ...
0
votes
0answers
56 views

Why does a directory appear when viewing the home folder but not when I use the command line in Linux?

It's an odd problem in that when I browse the home folder I see the directory 'Jquery' however when I use the command line nothing appears. I have used the commands ls | less, find . -iname jQuery, ...
0
votes
4answers
114 views

How to search for an installed application in linux

rpm -e jdk-1.6.0_17-fcs error: Failed dependencies: jdk is needed by (installed) xyz.i586 I tried to search for xyz.i586 find / -name xyz.i586 but no result.
1
vote
3answers
118 views

Linux: find - Stop as soon as it finds something

I am trying to use find to locate a single directory, and I would like it to stop as soon as it finds something, is this possible? Currently I am using the command find /directory/to/search/ ...
1
vote
0answers
54 views

find command that excludes ._ from output but locates all graphic files? [closed]

I'm writing a graphic viewer to find all the graphic images on the server so it can made available to a program for display. I need a find command to have it list all the graphic files, but not ...
1
vote
1answer
203 views

Find: exclude external hard drive from search

Is there a way to perform a find command on my whole computer, excluding external hard drives? I've been using the find command to search for junk left over from uninstalled software, like (from the ...
-1
votes
2answers
49 views

numbering some content of a file using grep or any other commands

I have a file like this: ==================================[RUN]=================================== result : Ok CPU time : 0.016001 s ...
1
vote
5answers
4k views

Find, match whole word only workaround

I just noticed, there is no option in Excel Find, to "match whole word only" (I am not talking about "match entire cell content") e.g. searching for "part" should not match "partner". MS Word has this ...
1
vote
2answers
91 views

FIND operands and order of arguments

I have a find command that I am unsure if I am placing my arguments correctly. find / -xdev -size -size -262144000c -o -type d \( -name .snapshot -o -name man -o -name Man -o -fstype mvfs \) -prune ...
1
vote
1answer
302 views

Bash script: Find a file inside specific folder in linux

I want to write a script to find all executable files under a specific directory which I want to pass in parameter. I am able to find all executable files using a predefined directory but I want to be ...
0
votes
1answer
77 views

How can I delete a specific file from a set of results using the find command in Linux?

I have the following command that lists all files with the extension doc, docx, etc. find . -maxdepth 1 -iname \*.doc\* The command returns numerous files some of which I would like to delete. So ...
0
votes
1answer
118 views

How can I execute multiple expressions using the -exec option in Linux via the find command?

I did have a read of the post at How do I execute multiple commands when using find?. Unless I have misunderstood the answer provided, I do not believe it provides the solution I am seeking. My ...
0
votes
2answers
1k views

find: missing argument to `-exec' when executing the find command in Linux [closed]

I get the error find: missing argument to-exec'` when I attempt to run the command find . -maxdepth 1 \( -iname \*.png -o -iname \*.jpg \) -exec echo {} \; The reason I am using echo is because I ...
1
vote
2answers
217 views

Interpreting regular expressions using find in Linux confusion

I am attempting to use the find command and came across an article at http://www.linux.ie/newusers/beginners-linux-guide/find.php which states: The wildcard character is escaped with a slash so ...
1
vote
1answer
303 views

Notepad++ find in files filter for files with no extension

I'm using Notepad++'s "Find in Files" functionality to find specific text in a large number of text files across a large number of directories and subdirectories. I understand how to specify file ...
2
votes
2answers
322 views

Grep, find line with minimum x words

Is there a way to find all lines with grep, that contains at least x words?
1
vote
3answers
1k views

How to find files on Linux where only root has read permission

I want to find files in some folder like /home/mike/www/test where only root has read permissions and not any other user. EDIT: I have the sudo and permission but I want to list all files where only ...
0
votes
2answers
18k views

If an Excel row contains particular words, return that row, highlight that row, or give Y/N for that row

I have a sheet containing thousands of cells in a column. These cell contains names of different securities. Some names of these securities contains a particular string such as "C/O". How can I use ...
2
votes
3answers
589 views

count files in a list of directories

I have file with a list of directories that I would like to know how many files are in each directory. .../images/idsuffix/userids/ This will give me the count of files and directories for ...
1
vote
1answer
198 views

how do I write find expression (atime = ctime) (access time = change time).

I want to find a set of files to remove that have not been access since their last inode change. Files in which the last activity happened when they were moved into the directory they are currently ...
1
vote
0answers
371 views

Find vs Findstr results

Per this answer I was attempting to use findstr to locate a string (a name) inside some HL7 log files in a directory. Findstr was getting 0 results, but Find returned plenty. I played around with ...
1
vote
1answer
306 views

Using find and sed to rename several subfolders

What I am trying to do is rename folders that are anywhere in the current tree, not neccessarily directly in the working directory. What I need to do is: "A 1" becomes "A 01" "A 2" becomes "A 02" ...
0
votes
1answer
69 views

Compare lists in excel [duplicate]

Possible Duplicate: Extract values from a range that are missing from another I have two vertical lists. I need to compare the two with each other and get the names that are NOT included in ...
11
votes
2answers
7k views

How to search for ? (question mark) in Excel

When I try to find the question mark character (?) in an Excel sheet, Excel cannot locate the cells containing them. How can I search for ? in Excel?
1
vote
1answer
2k views

'find' is not recognized as an internal or external command operable program or batch file

I am getting this error when I use the FIND function in a nested FOR loop and IF statements in a batch file. 'find' is not recognized as an internal or external command operable program or batch ...
1
vote
2answers
371 views

is there an 'upwards' find?

I found I asked this question on the wrong stackexchange site. To find files starting from a certain path, I can use find <path> .... If I want to find 'upwards', i.e. in the parent directory, ...
1
vote
3answers
1k views

find command behaviour when matching names without quotes

I was looking for differences in the find command with double quotes and without quotes. I found something odd. I have two files: xWrapper.java YWrapper.java and some in the pattern ...
1
vote
1answer
3k views

Unix/Linux: recursively search for files containing a string [duplicate]

Possible Duplicate: How to Combine find and grep for a complex search? ( GNU/linux, find, grep ) I have a directory hierarchy of files (some of which are plaintext and others are binary). ...
1
vote
1answer
121 views

Show files from terminal command results in Finder

I can find original files in a directory (as opposed to hard links) in Terminal with find ./ -type f -links 1 -name file2find How can I view the results in a single Finder window?
2
votes
3answers
400 views

How do I create a soft link to all executables in a different directory?

I am trying to create soft links to mingw's binaries in cygwin. So far I have: find /cygdrive/c/MinGW/bin/ -name "*.exe" -exec ln -s {} basename {} \; but I get: ln: target ...
4
votes
3answers
538 views

Find out where $PATH is defined

I recently installed an Arch-Linux System. If I type echo $PATH it points (among others) to a directory inside my /home/user/dir I can remember I set up somewhere. I have it as root user also, so ...
0
votes
1answer
234 views

Exclude all hidden directories in UNIX find

I'm doing a word search using the following command: find . -exec grep -q [some_word] '{}' \; -print -o -name .svn -prune -o -name .ssh -prune -o -name .boneyard -o -name log -prune -prune -o -name ...
1
vote
3answers
2k views

Find directories with all files inside older than X?

Is it possible on linux to find directories where all contained files and directories (and sub-directories' files etc.) are older than a given age? In other words, if a directory has one or more files ...
3
votes
5answers
915 views

Grep all files in a directory and print matches with filename

I have a list of log files that I create as part of a video encoding script that I wrote. I would like to search all of them and print out certain statistics from the encode - how fast they were ...
1
vote
6answers
930 views

UNIX “find” command, match literal “dot”

I need files ending with ".pdf" or ".png"; here's my attempt: find /Users/robottinosino/Desktop/_PublishMe_ -type f -regex '.*[pdf|png]' this incorrectly includes files ending with "Apdf", "Zpdf", ...
1
vote
2answers
196 views

find files where group permissions equal user permissions

Is it possible to do something like find -perm g=u? I say "like" because -perm mode requires mode to specify all the bits, not just g, and because I can't put u on the right side of the =, like I can ...
2
votes
2answers
199 views

How can I repair a corrupted “find” binary on CentOS?

When I try using "find" on my system, here's what I get: $ find Segmentation fault (core dumped) I assume the binary got corrupted somehow. How can I repair it? I don't have any other installation ...
2
votes
1answer
106 views

Linux “find -regex” doesn't handle binding

I have the following files, and need to match them like: ./foo.bar1.sh -match ./qux/foo.bar2.sh -match ./foo.sh -match ./baz.sh -no match ./foo.bar3 -no ...
3
votes
2answers
336 views

How can I retain grep's match highlighting when piping find into grep?

If I run grep foo bar.txt, grep highlights each occurrence of "foo" in bar.txt. But sometimes I want to use find to determine which files grep searches. So I do something like this: find . -iname ...
1
vote
2answers
108 views

How can I avoid descending certain directories with 'find'?

Currently I have this find command which avoids descending particular directories: find . \! \( -name ".hg" -prune \) \! \( -name "localhost" -prune \) \! \( -name "logs" -prune \) -type f The ...
0
votes
3answers
401 views

Why does Find in Excel give unexpected results?

I would like to find all cells containing the number 18 in an Excel 2007 worksheet where the numbers are in a column with entries in General format (both numbers and strings). When I use the Find ...
-2
votes
2answers
674 views

Can't find the path to proxy.pac file in OS X

I need to control my proxy.pac file in OS X, but I couldn't find it anywhere. I used whereis proxy.pac from terminal too — the whole story short: I want to find the path to a file in Mac OSX.
2
votes
4answers
934 views

Finding subdirectories inside all directories with the same name

I want to run a command to: Find all directories named "inc" under a folder "X". List all the subdirectories under each "X/.../inc/". Redirect the output to a file named "list" I tried various ...
-1
votes
3answers
282 views

Only output part after last “/” with find

This command: find ./ -name "mybinaryrpm-1.0.24-1.1.i586.rpm" gives the output: ./DirectoryName/SubDirectory/mybinaryrpm-1.0.24-1.1.i586.rpm but I only want the output: ...
1
vote
2answers
889 views

How can I clear the contents of every file in a subdirectory without changing ownership / permissions?

I can find the list of files using something like: find /path/to/files -type f And I can clear the contents of a single file with any of: > filename echo -n > filename cat /dev/null > ...