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
2answers
45 views

grep out condition and add the values of the grep value

I have a scenario that a csv file has the values of : abcd FAILURE 7 abcd SUCCESS 12 efgh SUCCESS 3 efgh FAILURE 5 mnop SUCCESS 6 mnop SUCCESS 4 abcd FAILURE 5 efgh SUCCESS 2 mnop SUCCESS 1 ...
2
votes
1answer
69 views

Simple find and copy script for linux [closed]

I'm quite a newbie to scripts in Linux. What im trying to get is a simple script that finds a file by its exact name, then copy that file to a different folder. So Essentially it should work like ...
1
vote
3answers
72 views

Unix delete with find: Delete all files that are listed in a file

In my root directory, I have a couple folders named something like AA, BB, CC etc., each containing files in the format AA1001.txt, BB1002.txt etc. In my root folder, I also have a file all_to_delete ...
1
vote
1answer
83 views

How to find and replace in the bookmarked lines in notepad++

I have a problem about how to find and replace in the bookmarked lines in Notepad++. For example my line is <content:encode><em>.... So I bookmark the lines that have ...
0
votes
1answer
228 views

How to find and replace in the between tags in notepad++

I have a problem about find and replace in notepad++. I want to find a space+space in text and replace with just one space. But the area I want to find and replace is between tags (ex: ...
1
vote
2answers
27 views

Excluding a file from UNIX “find” results based on existence of another file

I have a big bunch of directories, each with a series of .pdf files. Some of these files have successfully converted to .csv, some have not. An example directory listing using find ./: ...
0
votes
1answer
166 views

How to find special characters in Linux Vim

I want to find special characters in a text file. It is known that the UTF-8 encoded file contains Chinese characters , "-", "^A"(control-A, which is one of special characters), numbers, ...
0
votes
0answers
19 views

Finding files that are mostly NUL

I've got a hard drive copy that went bad where many files are of correct size but are completely filled with NUL (0x00) bytes. However, a couple of the files seem to have a couple KB of actual data. ...
2
votes
1answer
59 views

*nix find -type flag: can it accept multiple types?

I want to use find for getting all simlinks and regular files. I can use the -type for these individually, and I can use -o to string them together, but I apparently can't do -type fl. Is there a way ...
1
vote
4answers
87 views

String Search: find and grep and?

Task: 1) find a string 'decor' inside files in a directory 2) get # of occurrence for decor for each file that has it The first part of the problem is partially solved with find . -type f | grep -i ...
1
vote
1answer
86 views

Find the largest file in directory without size in output

I need to find the biggest file Only one file should be listed Search should work in given directory and subdirectories Output should display absolute path to the file with filename find "$PARAM" ...
1
vote
2answers
28 views

Configure find not to even look in directories, if directory name maches 2012

I'm using find /home/myid/dir-with100directories/ -mmin -5 -not -path "*/2012/* to find all files, except not in directory 2012, but somehow it works really really slow. And my guess is that find ...
1
vote
1answer
34 views

How is the OR boolean in find command?

How do you tell the find command to find string a OR b? Like: find . -type f -iname "aaa" OR "bbb" Any ideas?
2
votes
1answer
63 views

find -mtime fails to return results that ls -l show are there

On a Red Hat Linux system, I have a directory with several hundred files. I wanted to delete all files older than 24 hours. I did the deletion using find . -type f -mtime +1 -delete. Trivial stuff, ...
1
vote
2answers
229 views

batch find/replace using sed or awk

In every file with filename matching pattern1 I want to search for lines which start with pattern2, and add some string in a new line above those matched lines. As a simple example suppose I'm ...
1
vote
2answers
69 views

How do I search for a string in a group of files when some of those files contain spaces?

I'm running Mac 10.7.5. In a terminal, I'll use this command for finding files with strings find src/main -name "*" | xargs grep -i 'mystring' However when the files contain spaces, I'll get ...
0
votes
2answers
595 views

using awk with find -exec

I have a directory structure with 14 directories containing a bunch of files containing data in a three-column format (separated with tabs). I intended to use find and awk to extract the second column ...
3
votes
2answers
181 views

Is there anything faster than `find . | wc -l` to count files in a directory?

Not uncommonly I have to count the number of files in a directory, sometimes this runs into the millions. Is there a better way than just enumerating and counting them with find . | wc -l ? Is there ...
0
votes
0answers
14 views

How to use find with -delete when looking for directories

I know I can do find . -name '*.pyc' -delete But when I'm loooking for specific directories, -delete fails reporting that directories are not empty. Is it possible to force find to delete non ...
3
votes
1answer
324 views

How to find a file whose size is less than 10 MB?

I need to find a file in my current directory whose size should be less than or equal to 10 MB. ls -lh gives me the file size of each file but not sure how to find the files whose size are less than ...
0
votes
0answers
76 views

Does FIND (+ FINDSTR) use the indexed Windows search system (that is, the stuff I can select/deselect under ‘Indexing Options’)?

I added a test file (a 540 MB .txt file) using ‘Indexing Options’, rebuilt my index, and then tried searching for a string I know for sure is in the file. I then searched for the string using (1.) ...
0
votes
0answers
58 views

Two questions about FINDSTR and FIND on Windows 8

Can someone tell me how to limit the search results produced by running a FINDSTR or FIND command line search on Windows 8? I am searching a gigantic folder of text files and getting way too many ...
0
votes
1answer
70 views

moving the directories using find command

I am trying to find particular directory in one path and move the directory in other path using find. Source directory looks like below, /Dir1/country1/month1/date1,date2,date3 ...
1
vote
3answers
66 views

Move multiple files from filename list to a new folder

I have a list of filename in list.txt, which have 'abc1.png, abc2.png, abc3.png....'. However, I don't know the directories where the files are. I want to find all files in the txt file, and move ...
0
votes
1answer
56 views

'Du' command does not list all files

I receive different number of files with du -h and find: loom@loom-desktop$ du -h ~/storage/Apps/*/trunk/test/*.cpp | wc -l 35 loom@loom-desktop$ find ~/storage/Apps/ -path */trunk/test/*.cpp | wc -l ...
0
votes
1answer
1k views

Check if a Row Range Contains another Row Range values in Excel

I have an Excel file that contains two different columns having Customer Numbers (let's say CustomerA and CustomerB columns). What I would like to do to check which of the CustomerA values match the ...
0
votes
1answer
43 views

How to find and copy files with spaces?

I am trying to find mp3 files in any subdirectories and to copy them, for example, in the current directory. Here is the command I tried: find . -name *.mp3 -ls | gawk '{printf("cp %s .\n", $11);}' ...
0
votes
1answer
61 views

Why did “find . -iname ”*.jpg“ -type f -print0 | xargs -0 rm * ” delete all files?

The expected behaviour was to delete all .jpgs, but it deleted all files in the directory. How can the command be changed to find and delete all xyz files?
4
votes
1answer
498 views

Keep Find bar open across all other tabs in Firefox 25

Previously, the find bar (triggered using Ctrl+F which appears at the bottom) used to stay active across all open tabs with the search term retained. This is no longer the case with Firefox 25. I ...
28
votes
5answers
857 views

Deleting millions of files

I had a dir fill up with millions of gif images. Too many for rm command. I have been trying the find command like this: find . -name "*.gif" -print0 | xargs -0 rm Problem is, it bogs down my ...
0
votes
1answer
42 views

Copy specific subfolders on linux

I have similar file sturecture: /home/dave/documents/static/ /home/static/ /home/dave/pictures/static/ /home/dave/otherfolders/ ... I want to copy from this directory only folders named static. ...
0
votes
0answers
59 views

Find files based on content and sender, receiver and based on date range provided

I would like to find files based on content and sender, receiver based date range provided More details below: Find files between date range (where folder names are the dates in the format yyyyMMdd) ...
0
votes
2answers
62 views

How to find the file which was last updated on my Linux box?

I'm executing a command which updates a file in an unknown location on my system. What is the the find/locace/whatever command that will tell me, which file was the last to update on the system? This ...
1
vote
1answer
47 views

Unhide all .htaccess files on mac

I am trying to unhide all the .htaccess files in my home folder. Below I've pasted what I'm using now, but it isn't working. find ~/ -iname ".htaccess" | xargs chflags nohidden "{}" Anyone knows ...
0
votes
1answer
66 views

Word Find - find any highlighted text that starts with a squared bracket

Is there a way to Find highlighted text that ONLY begins with a open square bracket? I've tried using the square bracket as a wildcard, but it won't find any adjoining words. For example, I have a ...
1
vote
1answer
59 views

How to only remove file extensions while keeping other parts as they are

I have quite a few files with different extensions sitting under sub folders like 'aaa' /f1/aaa/a.txt /f1/aaa/a.sql /f1/f2/aaa/b.txt /f1/f2/aaa/b.csv what I need is to extract all these files from ...
1
vote
1answer
412 views

How to remove string from JPEG files using find?

I have many files in many media catalogs with some string and I want to remove this string. The string is contained inside JPEG files and looks like: ...
1
vote
0answers
116 views

Linux: Trying to find files from a list recursively and copy them somewhere else

I'm trying to find files from a list and copy them to another place. So I started my test loop like that: # cat ~/my_filelist.txt | while read file ; do echo "$file" ; done After I hit enter all ...
1
vote
3answers
132 views

Permanently set `find` regextype

GNU find allows the use of different regex formats via the -regextype option, but as far as I can tell I have to type out -regextype <whatever> every single time which is onerous. If one wants ...
1
vote
1answer
54 views

Linux find command copy found files

I have mounted an image and have used the find command to show all file types found on the image ~/mounted $ find . -type f -exec file {} \; I know how to direct the output of the command to a .txt ...
1
vote
1answer
53 views

What is the meaning of -perm -400 in find command?

I found in a text the command find / -name "foo" -perm -400. What does the -perm -400 indicate?
1
vote
1answer
233 views

Batch run mogrify including subdirectories

The command mogrify -format jpg *.NEF when run in a directory converts all *.NEF files to JPEGs. What I want to do is to be able to run mogrify in *.NEF files inside subdirectories as well using one ...
0
votes
0answers
50 views

How can i keep and remove some charecters from specific line notepad++

i have about 1000 of 80000 rows that looks like these lines and with different disposition ...
0
votes
1answer
47 views

How to quickly find a file by name in package explorer in Eclipse?

How to quickly find a file by name in package explorer in Eclipse? I know that Ctrl+Shift+R and type in the first few letters of the name of the file, can open the file, but the caveat is that the ...
0
votes
1answer
59 views

linux find regex - can I use 'search', instead of match?

the find utility is powerful, but I'd need some additional features. its -regex search treats each filename (or dirname) as a string and applys given regex only at the beginning of name. like ...
2
votes
1answer
219 views

linux find: searching for files smaller than 2Kb misses the ones between 1 and 2Kb

I just stumbled in an oddity with the find command on Linux, in a nutshell I had the need to find all files smaller than 2Kb in a certain folder, so I issued the command: find /folder_to_search_into/ ...
0
votes
3answers
154 views

Finding a file by md5sum

Given the md5sum of a file, I want to know if anywhere else in the directory tree is another file with the same md5sum (but maybe under a different name). How can I do that in bash? P.S.: To ...
1
vote
2answers
926 views

find command: search for files owned by many users in one command

In Linux, is there a way to do a search for files owned by multiple users (or group(s) of users) with the "find" command? Something like this? find . -user john, akido
0
votes
1answer
28 views

opening number of files in vim found using find

I do, find . -type f -name '*.c' to find the list of .c files in my project. I want to open them all in the vim. I did something like this. find . -type f -name '*.c' | xargs -- vim It was not ...
0
votes
1answer
247 views

Find and replace numbers in Excel?

I have a spreadsheet with @ 4000 cells containing a summation like (for example) =439+23+678+1. [Stock market data.] Each number in the formula could vary between 1 and 5 digits. I need to replace ...