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

1
vote
1answer
194 views

Find and return sheet name

I am looking for help in finding a string within a workbook and returning the sheet name (Address) or where the same can be found, e.g. Let's look for Lisbon which is located in sheet Portugal (sheet ...
1
vote
2answers
158 views

rm -r: exclude certain subdirectories

The problem I have a directory structure, e. g. something like this (here trailing slashes represent folders): ./A ./B/A/A ./B/A/B ./B/B/ ./B/C ./C/ And I need to recursively remove everything ...
0
votes
1answer
81 views

Why is [find] running incredible fast, if run twice?

In the Dash of my Ubuntu/Linux system are two versions of the same program. To find where the corresponding .desktop files are located I used find / -type f -name 'Sublime Text.desktop' 2> ...
1
vote
1answer
160 views

What does “{} \;” mean in find (in Linux)?

Sometimes I see a command like find . -name * -exec ls -a {} \; I was asked to execute this. What does {} \; mean here?
2
votes
2answers
168 views

Using find before wc eliminates total

I'm using find to search through all subdirectories and current directory to find all .py files, and then run wc -l to find number of lines. However, when I use find with wc, the Total field is left ...
0
votes
1answer
73 views

Find .gz file using original file

I would like to retrieve a .gz file from a directory based on original file name. Please let me know how to do this. In the below example, I know only original file name (02.txt), and I need to ...
2
votes
2answers
106 views

find: Find Files (Strictly) Older than Another File

When I deploy my software, I ship a zipped file to the target server and extract it's contents. In addition to this, at the same time I also place a metadata file in the directory, detailing what was ...
0
votes
2answers
310 views

Unix command for finding and deleting folders with folder names in date format

I have folder names in the below date format 20130801 20130802 20130803 20130804 20130805 20130806 20130807 20130808 . . . 20130819 Similarly ,I have folders created from past two years for each ...
0
votes
1answer
46 views

SSH private Keys

I want to use a simple command to count the number of ssh keys in a users home folder, but would rather use the output from the /etc/passwd file as input. The find command is easy: find ...
1
vote
1answer
191 views

Use 'find' to find and delete large files of a certain type

I am trying to find and rm -rf large files in RHEL, but what I would expect from this command that would give me purely the file directories, feeding them into rm -rf, it is not removing them. My FU ...
1
vote
1answer
271 views

find files with spaces modified in last 60 days and tar.gz in files no bigger then 4gb with date

I maintain a file server. I need to backup files that have changed in a period of time. First i compressed up everything to 4gb files and backed up to dvd. But 7z that I was using 7z a -t7z ...
0
votes
3answers
379 views

How to separately count number of files, directories, symbolic links and hard links within a single find run?

To check a successfull migration I'm using find to count the number of files, directories, symbolic links and files with more than one hard link. As the directories to check contain a huge number of ...
0
votes
3answers
185 views

Using xargs with find

I want to exclude some directories from searching files and than run the find command to find required files. I am using below command find . -maxdepth 1 -type d | grep -E -i 'sensors' | grep -v ...
0
votes
1answer
289 views

why don't file search utilities just load and parse the MFT?

I've noticed when I search for a file by name (in Windows or Linux) it's typically a disk-intensive process, especially in Windows. It seems that the utility (Windows Search, or "find" in Cygwin) ...
4
votes
2answers
185 views

Running find and xargs in background

I want to run this command in background because the process could take a long time. How can I send it to a background process? find /tmp/ -type f -mtime +3 | xargs rm -Rf This does not work: find ...
0
votes
3answers
94 views

Listing files, including archive contents

Is there some method to find, from the shell, all files matching a file pattern including those inside archives (specifically: zip archives)? The simulation package "VASP" produces files called ...
4
votes
7answers
831 views

How do I return only file names from the find command?

I'm looking to get a list of just file names (without the rest of the path) when executing the find command from a terminal. How do I accomplish this on the mac?
1
vote
1answer
748 views

Removing files older then 1 month, but leave one file per month

I try to script something similar to Removing files older then 1 month, but leave files created at the 1st day of the month. The difference is that I need one file per month. I am using the script ...
0
votes
0answers
41 views

How do I 'find' and 'replace across multiple documents

Is there a simple way to do a 'find' and 'replace' across multiple Word documents. Need the headers and footers also to be covered for the replacement. Have tried a VB macro from the web but it didn't ...
1
vote
3answers
1k views

Argument list too long for xargs/exec

I'm working on a CentOS server and I have to move around and cat together millions of files. I've tried many incarnations of something like the below, but all of them fail with an argument list too ...
0
votes
0answers
53 views

Find match in Excel 2010 from 2 sheets & copy corresponding contents from sheet 2 to sheet 1

I have 2 worksheets: Worksheet 1 with Column H need to find a match on Worksheet 2 with Column F If a match is found, I need to copy the contents of worksheet 2 column g to worksheet 1 column E. ...
0
votes
2answers
316 views

Find directories containing a certain number of files

Was hoping I would be able to do this with the find command but I can see no test in the manual for doing what I want. I would like to be able to find any directories in the working directory that ...
3
votes
2answers
2k views

Finding files which contain a certain string using find (1) and grep (1)

find . -type f -print -exec cat {} \; | grep some string is not printing the file path in the above statement. Ubuntu, bash 4
1
vote
2answers
70 views

Checking version of Applications installed in ~/Applications with unknown username

I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications /bin/cat ...
3
votes
2answers
71 views

How to exclude files using find

Unlike the --exclude parameter for rsync that can excludes both files and directories, the *nix find command's -prune parameter can only exclude directories. So how can I exclude a certain type of ...
1
vote
1answer
101 views

Linux command find -print. When to I need this option?

What is the difference between: find . -name "*.txt" and find . -name "*.txt" -print ? I mean what is the use of print in find. I see that it prints the results anyway so why is this option ...
1
vote
1answer
195 views

Find command doesn't work for certain subdirectories

I just downloaded some source code from a repository and I'm trying to locate a specific file in it. For simplicity, assume that the entire project has the following directory hierarchy ...
2
votes
2answers
1k views

Print full path of files and sizes with find in Linux

Here are the specs: Find all files in / modified after the modification time of /tmp/test, exclude /proc and /sys from the search, and print the full path of the file along with human readable size. ...
0
votes
1answer
343 views

excel 2010 how to identify if a word is present in a group of cells or a row [duplicate]

I would like to use a formula to identify if a cell in a group of cell contains a specific word. Example, I'd like to search if a cell has the content X The formula's response could be 1 if found, 0 ...
-1
votes
2answers
46 views

Unix - Searching for every file with a certain string in it

I am searching for every file within a root directory and want to search every subdirectory as well. I have tried grep -r "message" * but I am not sure that this searches every subdirectory, any ...
3
votes
2answers
1k views

Efficient way to search string within file find and grep

I am searching all files containing a specific string on a filer (on an old HP-UX workstation). I do not know where the files are located in the file system (there are many directories, with hudge ...
0
votes
1answer
25 views

Find a directory only contained within a certain folder

I have a directory structure like: foo |__bar |__bin | |__tmp | |__bez |__tmp I need to find the tmp directory in bin/tmp, but not the one in bez/tmp. It seems to me ...
0
votes
2answers
183 views

Linux command to find all instances of a file pattern?

I'm looking for a way to scan a directory recursively and print out all instances of any file that ends ".qfx". Thus, for a given directory: somedir/ fizz.qfx buzz.qfx blah/ ...
2
votes
3answers
421 views

In the Mac terminal, how do I “find” a file and then quickly cd to the parent directory?

I want to open terminal, find a file or folder, and quickly navigate to that folder or the parent directory of the file. I can quickly get the path using find ~ -name 'filename.txt' but I can't ...
2
votes
2answers
1k views

How can I make `find` find files in reverse chronological order?

I want to find files in subdirectories sorted by timestamp (of creation), with most recent first. I have looked at the man page but it seems to only seems to let you filter by timestamp rather than ...
4
votes
4answers
132 views

How can I find a path by providing only part of the path?

Let's say I need to find this path /<some_where_in_root>/find/this/path and the only information I have is /find/this/path. What would be the best means of locating the full directory? I ...
0
votes
1answer
88 views

How to collect all media file in a mac directory structure?

I'm trying to copy all media files (Mac file type of Image or Movie) to the same directory structure, only taking media files. Is there a more efficient way than what I've got below? Is there a ...
0
votes
2answers
379 views

Trying to find any home directory that is writable by anyone

I am trying to locate any user home directories and their files that are writable by anyone. I wrote this: find /home -type d -perm -200 | grep . || echo no world-writable directories here ...
0
votes
1answer
77 views

How to use arguments with 'find -exec'?

I'm trying to generate static html files for all php scripts inside dir: find . -name "*.php" -exec php {} > {}.html \; But it just dumps all results to {}.html. How to do it properly? And how ...
3
votes
1answer
297 views

Delete old log files in AIX

I am trying write a script to delete old log files in \var\log\applog\nmon on my AIX system. We usually get alerts that the file system is almost full and at the moment delete old files by hand. So ...
0
votes
3answers
285 views

How to print out all non-hidden files recursively in a dir using lpr

find . -type f | grep -v '/\.' lists out all non-hidden files in the current dir recursively. Example of this command given the following file tree . ├── css │   ├── base.css │   └── main.css ├── ...
2
votes
3answers
5k views

How to display file details (size, date, etc.) from Linux “locate” command?

The (slow) Linux “find” command has an option, “-ls”, to display size, date, etc. like the “ls -l” command. But the “locate” command doesn’t seem to have that. So how can I get the equivalent ...
0
votes
1answer
573 views

How can I use lookahead and lookbehind regular expressions on Linux using find?

I generally use the following command to match patterns find . -maxdepth 1 -regextype posix-egrep -regex '.*/{pattern}' However when I attempt to use a lookahead for example, no results are ...
0
votes
1answer
136 views

Cygwin: `find / -name libstdc++-6.dll` shows no results

In Windows Explorer, when I search for libstdc++-6.dll, it returns half a dozen results. I'm trying to do a similar filename search in Cygwin with find, but that shows no results. find / -name ...
0
votes
1answer
1k views

find command is giving error on Mountain Lion

I'm trying use the following command on Mac OSX Mountain Lion to get a list of my mail folders as part of my .muttrc file: `echo -n "+ "; find ~/.mail/fastmail -maxdepth 1 -type d -name ".*" -printf ...
0
votes
1answer
43 views

find expression not working

I would like to convert all powerpoint type files to pdf using the find -exec and unoconv command. find . -name '*.@(ppt|PPT|pptx|PPTX|pps|PPS|ppsm|PPSM|ppsx|PPSX|pptm|PPTM)' -exec unoconv -v -f pdf ...
3
votes
2answers
2k views

How do I make “find” exclude the folder it searches in?

I'm running the following command: find /var/www/html/content/processing -type d -mtime +1 -exec rm -rf {} \; I would like to delete all the folders under the processing folder (the processing ...
1
vote
1answer
789 views

how to delete a file matching a pattern in linux

How do I find a file matching a pattern and then delete all of it? Something like find -name 'pattern%' Then how to delete all of found entries?
3
votes
1answer
524 views

How do I find all files that are *not* group writeable?

I see the following question describing how to find group writeable files: How can I find all PHP files with group write permissions? But I want files that are not group writable! (Also, I couldn't ...
0
votes
1answer
142 views

Does the order of how a find command in Linux is negated matter?

I am attempting to negate a find command so that I get every other file except for the file or files in the command. find . -maxdepth 1 -regextype posix-egrep -regex '.*/.*\.svg' -exec echo {} \; ...