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

2
votes
1answer
34 views

Native solution to use find from vim

I'm on a server, editing some files, and I'm using an account shared with others. I'd like to know if there's a way to use find to get a list of files to edit, just like :grep does, but for files. I ...
4
votes
1answer
8k views

Ubuntu Linux: find files between specific times?

I found an SO called using Find/Grep to search files between specific time of day Based on that and a Unix SE called Grep command to find files containing text string and move them I ended up with: ...
0
votes
1answer
1k views

Using find with -exec gzip and grep

I have a bunch of zipped up log files and I want to search them all for a string. I tried this but it's not working: find ./ -name "*.log.zip" -exec gzip -dc {} | grep ERROR \; It's giving me: ...
1
vote
1answer
41 views

Windows 8: identify and consolidate files

Windows 8: How can I output a list by folder of all my MP3 music files which I can import into Excel so I can then select and consolidate in one folder? I have seen some code which would appear to do ...
1
vote
4answers
2k views

How to combine find and grep to recursively search for str or str2 in *.html and *.php files from /home/smith/sourcecode?

How can i combine find and grep to search for str1 or str2, recursively, in all *.html and *.php files starting from a directory named /home/smith/source? The output only needs to list files (with ...
2
votes
1answer
81 views

Using inode number to locate hardlinks

How can I use the inode number to locate all hardlinks to the file "file.txt" in my home directory?
2
votes
1answer
36 views

List directories without erroring if none exist

I have a rather strict set of specs for a directory listing that I need: It must list the directories in the current directory It must list purely the basename (no "./", no trailing slash) It ...
1
vote
2answers
565 views

Finding not empty directories without subdirectories and specific sorting

I have a problem with my "homework" on studies. I have to list all not empty directories from /var and /usr, which do not have subdirectories and their owner is not root user. Also, for each ...
0
votes
1answer
136 views

Single “find” command with multiple arguments?

I need to devise a single find command that searches for: All C# or Java programs Located in the home directory of the current user Have at least one hard link Readable for everybody Have at least ...
0
votes
1answer
41 views

how to find files with cygwin

We like to search many directories in a Windows environment with cygwin. We tried find . -name *.txt -print but it complains the -print predicate. What is the correct command then ? We only want ...
1
vote
2answers
90 views

Finding folders only

My harddrive is in a mess, so I decided to do a cleanup. As a part of this, I want to merge all folders containing music into one. What I want to do is, look for any *.mp3's and *.aac's on my drive ...
0
votes
2answers
89 views

Do I need to use -r with the command cp when using the find command in Linux?

I have documents spread between multiple directories in a given path e.g. /media/devicename/name_of_directories. I used the find command to help locate certain files e.g. .doc, docx, etc find . -type ...
4
votes
1answer
318 views

How to find all jpeg images of the same camera model

Recently during a installation messup , I lost all my files from my windows NTFS drives. I installed on testdata on Ubuntu 12.10 Desktop edition and with the help of photorec could recover a lot of ...
1
vote
0answers
224 views

Search From a List of Multiple Entries using CTRL+F

I have many documents that I am viewing using Google Chrome and I am searching the PDF document for a word1. If word1 doesn't show up, I search for word2. If word2 doesn't show up, I search for word3. ...
1
vote
3answers
66 views

find exactly one file in directory

I have very big collection of files. When I use command find I'm sure there is only one file in this collection. To make all my find commands faster I would like to run find command just until it had ...
2
votes
1answer
335 views

Removing a directory containing a file using find

I'm searching a list of directories for certain files and I want to delete the directory that the file is in. This is what I'm trying: find /converter/storage/unmatched/ -size -4b -name '*.mp3' ...
1
vote
2answers
5k views

How list file by range of date?

I would like to list files with 3 days years old. I found this one at stackoverflow: find . -type f -printf "%-.22T+ %M %n %-8u %-8g %8s %Tx %.8TX %p\n" | sort | cut -f 2- -d ' ' | grep 2012 But I ...
5
votes
1answer
773 views

Convert symlinks to hard links

I'd like to recursively convert soft links to hard links in a directory. I've tried something like this: for f in *; do (mv $f{,~} && ln $(readlink $f~) && rm $f~) done …but it ...
0
votes
2answers
40 views

How to move old file with previous command

this command finds me files which I want to move to old folder find /home/ -maxdepth 1 -type f -mtime +1 now how I cann result of this command to move command mv (previous files) /old
2
votes
2answers
3k views

Renaming multiple files which match UNIX find keyword

I have the following output from find command for finding files containing yyy in name: ./plonetheme/xxx/yyy-logo.png ./plonetheme/xxx/profiles/default/plonetheme.yyy_various.txt ...
0
votes
2answers
715 views

Copying all files inside subdirectories and renaming instead of overwriting

I have a number of images inside subdirectories of another directory which I'd like to copy to one single directory so all the images are in one place. After a bit of searching, I found and then ...
-1
votes
2answers
60 views

How to search a tree folder

How can I do a search of all directories calles i18n under trees like src/main/resources using find or any other unix command. Everything I'm trying doesn't work I'm looking for something like: ...
0
votes
2answers
342 views

Linux - Find recently accessed files on webserver by web visitors

Is it possible to find files which were recently accessed by web server? Using the Unix "FIND" command? I am getting a lot of SPAM emails because someone's accessing a PHP script in one of my ...
3
votes
1answer
1k views

How to get rid of errors when running find command in Linux?

I am using following command to list out 20 large files in a directory. But along with the file listing, it also shows error messages, such as permission denied. I tried adding 2> /dev/null but it ...
-3
votes
3answers
257 views

How to comble find and file command? [closed]

My teacher gave me a homework on combining find and file Use find and file to display all files in the /home subdirectory tree, as well as a guess at what sort of a file they are. I tried ...
2
votes
3answers
337 views

Using find, xargs, etc. to output similarly named files

I have a folder full of HTML files: 001.htm 002.htm 003.htm … I want to run Pandoc on them to convert them to similarly named Markdown files: 001.md 002.md 003.md This command works on one of ...
0
votes
2answers
80 views

How to send files from Find to another program?

If this is the wrong stack* site, I apologize, but I'm trying how to send the results from find to another app? what I'm trying to do is find all *.plist files and send them to plutil to convert them ...
6
votes
2answers
592 views

Why is the grep/-r/--include combination slower than the find/-exec/grep combination?

From my understanding, the two following commands roughly accomplish the same thing: Command 1: find -name "filename.xml" -exec grep someString {} \; Command 2: grep -r --include=filename.xml ...
3
votes
2answers
416 views

find any script which is running for more than say 30 minutes in Linux System

Please share command to find any script which is running for more than say 30 minutes. in Linux System
1
vote
2answers
408 views

Why does find. -maxdepth 1 with the -a option/flag not return any results on Linux?

I would like to find all png AND jpg files and used the following command and no results are returned however if I replace -a with -o it shows me the list of files. Why is that? `find . -maxdepth 1 ...
1
vote
1answer
190 views

Why can't I exclude 2 or more patterns from the find command in Linux?

I am attempting to exclude .svg and .jpg files from my find command however it still returns both of them. What am I doing wrong? find . \( ! -iname \*\.svg -o ! -iname \*\.jpg \)
0
votes
1answer
1k views

Why does the following find regular expression not work on Linux?

I am attempting to locate files that match a particular pattern however attempting to run the command below returns no results even though there are files that should match the pattern. find . ...
0
votes
3answers
500 views

piping output of find to xargs wc gives unreasonable totals

In a project with thousands of files, I wanted to compare total lines-of-code, to lines-of-code just in PHP (discarding CSS, JS, etc). When I run find . -type f | xargs wc -l I the total on the ...
0
votes
2answers
657 views

Using wildcard to find (and delete) matching files on a Linux box

I want to delete a specific config file for Awstats for every user on the box. What is the best way to delete them, and possibly, in one line? All the files are under /home and have this structure: ...
0
votes
1answer
166 views

GNU find .extension files and -exec, while new .extension files are being made

Here is a problem, can someone please explain or provide some references. I've been trying to read since an hour but can not find the answer. Suppose, I have process1 going on a pool of directories. ...
0
votes
1answer
65 views

List of directory names without the path?

I'm looking to get the name of a bunch a directories at a specified level. This is what I've got so far: find . -type d -depth 2 -print But this also prints the relative path of these ...
0
votes
1answer
88 views

mv command - parametric source and target

I have folder "F A" containing some subfolders and files and another folder "F B" containing the same folder structure but no file: find . -type d . ./F A ./F A/SF A ./F A/SF B ./F A/SF C ./F B ./F ...
2
votes
1answer
3k views

How to find hyperlinks in Excel 2010 and de-activate them?

When opening my Excel sheet using Excel 2010, I get a yellow bar at the top from Excel informing me that it has de-activated the automatic update of hyperlinks. To my best knowledge, I do not know ...
0
votes
1answer
370 views

Unix - Find files with the same name under a directory using ls

I want to list all suhosin.ini files under /etc/php5/ directory. The thing is that the 3 of them are one level deeper in the directory tree. I want to combine these two to one command # ls ...
2
votes
4answers
277 views

Does running the 'find' command fork a new process?

When I type find in unix a shell, is a new process created (to handle the find operation) or not? And why?
0
votes
1answer
49 views

Use find to search in hidden dirs

Need to collect all git configs, I use find / -type f -name '.gitconfig' But also I need find out all locals 'config' under hidden .git dirs
3
votes
2answers
429 views

Linux: find first result from specified search path

If I have a colon-separated path list, much like $PATH, but not neccessarily $PATH. I want to search that list for a specific file name. However, I only want the first matching path. I have ...
3
votes
3answers
69 views

merge pieces of file together

I have a directory tree of files I need to loop through and reformat the lines. can I do this with sed with some combination of find? for each file, I'll need to adjust the text in the file from ...
3
votes
3answers
361 views

Why doesn't this for loop work?

This is on Ubuntu 12.04 I'm trying to figure out how to get ffmpeg to do a batch conversion of FLACs to MP3, recursively. If I cd into a directory and use for f in *.flac; do ffmpeg -i "$f" -c:a ...
0
votes
1answer
28 views

backup time machine style

I would like to find a more solid and handy solution to my small problem.. My idea is to backup every midnight my home directory incrementally, so I want only the modified files (of today) to be ...
0
votes
1answer
191 views

Finding text in Ubuntu (gnome) terminal output [duplicate]

Possible Duplicate: Search Terminal Output Imagine this scenario: You run a command at gnome terminal. This command has made a bunch of outputs to the terminal. After some time, you ...
0
votes
1answer
169 views

Using find command with recursive copy without -r or a while/for loop

I have the following problem. Normally one would use the command find exec cp -r to copy everything from one directory to another. In this case I am not allowed to do so, or use a while/for loop for ...
1
vote
1answer
49 views

How can I select files which meet a condition in a directory structure

In have a big directory tree in OSX (Mountain Lion), and I need to delete all the files below a certain threshold filesize. I could create a duplicate of the directory excluding the small files, or ...
2
votes
2answers
1k views

Find difference with mtime - and +

Can someone explain the difference with mtime - and + switch as both are not bringing back the results I need. I'm looking to delete all files older then 5 days find /mnt/sdb1/tmp/ -type f -mtime +5 ...
2
votes
2answers
123 views

use pipe inside a find exec statement

I'm trying to find which jar contain a class, I wrote the below, which doesn't seem to work any ideas? find -type f -name "*.jar" -exec jar -tvf "{}" \| grep MyClass \; -ls