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
2answers
93 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
2k 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
406 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
15 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 ...
4
votes
1answer
659 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
1answer
143 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
85 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
78 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
3k 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
76 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
83 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
752 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 ...
29
votes
5answers
1k 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
48 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
99 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
66 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
2answers
68 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
93 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
64 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
516 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
204 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
191 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
58 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
71 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?
2
votes
1answer
429 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
58 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
87 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
67 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 ...
3
votes
1answer
363 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/ ...
1
vote
3answers
192 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
2k 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 ...
2
votes
3answers
309 views

How can I find all files on a folder tree that have a none alpha numeric characters in it

I have taken over from someone else a lot of historic data. However the file names are totaly random and badly formatted IMHO. To start with I want to get a list of all files that contain spaces, or ...
3
votes
2answers
366 views

find -exec should end with \; or +?

According to the man find -exec option must end with ;. The expression must be terminated by a semicolon (``;''). But when I use find-grep in Emacs, the expression end with +. Which one should I ...
2
votes
1answer
355 views

Recursively delete all .exe files with the same name as the containing folder

I want to delete all .exe files in the current folder and all the sub-folders. I read that find . -name "*.exe" -exec rm -f '{}' \; will do, but I want to do the delete only if the container folder ...
4
votes
2answers
505 views

How make a compressed tar when there are too many filenames for the shell to expand on a single line?

Normally I would just do something like: tar -czf archive.tar.gz *.csv But when there are too many files in the directory for the shell to expand on a single line this doesn't work. In these cases ...
1
vote
1answer
264 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
212 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 ...
1
vote
1answer
115 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
216 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
275 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
78 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
120 views

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
453 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
47 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
656 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
343 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
627 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
300 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
494 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) ...