Questions tagged [find]

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
35 views

find and rename base directory and files under each basedir, add a prefix

I would like to recursively rename all matching directories and files under a path with a prefix that depend from the current directory. . ├── G1_BIN_REFINEMENT │   └── marker_genes │   └── ...
user1967473's user avatar
1 vote
1 answer
37 views

Excel - return True/False value by searching multiple keywords in one column

I need help with returning results for several keywords in multiple columns in an Excel sheet, and I'm having trouble finding a similar scenario using search engines, so apologies if this has already ...
Yasmin's user avatar
  • 13
1 vote
1 answer
29 views

How to tell which files are new or have been modified between calls of a script

I want to call a shell script regularly, and in it I need to process the files present in a directory tree that are new or that have been modified since the previous call of the script. My 1st thought ...
dargaud's user avatar
  • 190
2 votes
1 answer
50 views

List only bottom level directories using find

So, let's say I use find to search a directory for folders. find "/home/user/Documents" -type d -print While this does list all the directories in said location, I only want to get the ...
Eduardo Perez's user avatar
3 votes
1 answer
109 views

Notepad++ Delete Multiple Lines with Find in Files

I want to delete the whole line that contains certain words such as: build, name, disk. I know that there is a search string ^.*?build.*$(\R|\Z) which will find lines containing "build" How ...
wikisP's user avatar
  • 33
1 vote
1 answer
91 views

Color of the highlight of the found word is too faint to see in Word 365

When I use the "Find and Replace" feature, the word that has been found is highlighted in a very faint gray such that I can't see it very well. How can I change the default color that MS ...
Eddie Gnz's user avatar
1 vote
1 answer
62 views

How to find 2 consecutive words, but counting only the shortest string [closed]

I want to be able to search in Notepad++ for a string that begins with a [startWord] and ends with an [endWord]. Additional conditions: the [startWord] and [endword] can each only appear once in the ...
Atlantida23's user avatar
0 votes
0 answers
25 views

How can I find an alias to a server that no longer exists on Mac M1Max Verntura 13.2

I installed Carbonite on my Mac. Every time it runs it produces an Apple dialogue box that says it is unable to find the server "Craig's Computer Server". Note the ' mark. This causes ...
evan-e-cent's user avatar
0 votes
1 answer
35 views

How to transform nested subfolders into a single subfolders

Whats a good way of “collapsing“ subfolders of a specified directory into a single folders whose name is a join the subfolders? So given this directory structure… ./zero.csv ./reports/r1/a/b/c/one.csv ...
Ashley Coolman's user avatar
1 vote
2 answers
134 views

Cygwin find returns "missing argument to `-exec'"

I have backups script that removes backups older than x days. On Linux machine this is working well: find /backups/dummy-prod-db -name "*_D_dummy-prod-db*" -type f -mtime +7 -exec rm -v {} \;...
Kamil's user avatar
  • 2,666
-1 votes
2 answers
54 views

How do I list all directories with include same name subdirectory?

My musiclibrary is a mess. I try to create this structure: /music /music/artist/album/ For some reason I have several artist with this structure. /music /music/artist/artist/ /music/artist/...
jafi's user avatar
  • 3
11 votes
1 answer
584 views

In bash, how to find all copies of a given file in particular directories?

Let's say we have a file /a_long_path_1/foo.doc of size, say, 12345 bytes, and we would like to find all copies of this file in directories /a_long_path_2 and /a_long_path_3 including all their ...
user avatar
1 vote
1 answer
120 views

Set "Find in page" starting position in Firefox (works in Chrome)

Summary Is it possible for "Find in page" (built-in browser page search) to work in Firefox like it does in Chrome, specifically: can one specify, by clicking on the page, the start point on ...
coderbot's user avatar
2 votes
1 answer
506 views

Bash find using regex fails with digit matching

I'm using find (GNU findutils) 4.7.0 with GNU bash, version 5.0.17. touch hello.32.world.txt find . # works, output is: ./hello.32.world.txt find . -regextype posix-extended -regex '.*hello\.32\.world\...
Andrew Parks's user avatar
1 vote
0 answers
31 views

UNIX command find starting directory .*

Can you explain what does the following UNIX command find does? find .* where .* - starting directory. I know "." is current directory, but cannot find the explanation about ".*".
StaceyKosheen's user avatar
1 vote
1 answer
193 views

Find files containing a string and execute command

How do I find files that contain a specific string and execute a command on these files? In my case, I'd like to find all *.md files that contain the string ^ - HIMS$ and stage them with git. I know ...
longing-for-an-answer's user avatar
2 votes
1 answer
24 views

Inconsistent behavior from 'find' on zfs under Linux

I was checking to see if I had multiple copies of python on my system today, and I got some super strange behavior from find: mark@neverland:~/repos/lpod-python$ ls -i /bin/python3.10 534638 /bin/...
MTippetts's user avatar
0 votes
1 answer
200 views

Move and rename files based on their parent folders

I'm trying to write a Bash function that will find files in a given directory tree and move them to the current folder while renaming them based on their parent folder, but I'm still stuck on the ...
Hashim Aziz's user avatar
  • 11.6k
0 votes
0 answers
51 views

How to move all old files from Downloads to the trash with one or more terminal commands in macos?

I already found the command with which I can select all the files and directories that I do not want to send to trash. That command looks like this: find ~/Downloads -newerat "2 months ago" -...
Evert's user avatar
  • 131
0 votes
1 answer
143 views

Make an alias work in "that" directory? Even if created in .zshrc [duplicate]

This is zsh but perhaps applies to other shells. Say you are in directory /foo and you % find $PWD -name '.*' it works fine, results are from /foo. Now (in /foo) type this % alias crazy="find $...
Fattie's user avatar
  • 111
0 votes
1 answer
204 views

Find folders that contain only one specific file (.DS_Store) and no others?

Is there some way to use the find command in macOS terminal to find all folders recursively within a given path that are virtually empty, or empty aside from a single .DS_Store file? I've tried the ...
MikMak's user avatar
  • 2,027
0 votes
1 answer
101 views

What does this find command with options mean?

When i run this command in Debian sudo find . ! -name . -type d -or -type f It lists all the files in the current path, but not the directories, so I think I know what it does. But what does the -...
Tlink's user avatar
  • 169
0 votes
1 answer
2k views

find + how to delete files that exists only on specific folder

to delete files on under folder we can use the following approach with find find /home -type f -delete but how to delete recursive only the files that exists under temp folder ? lets say we have the ...
King David's user avatar
0 votes
1 answer
141 views

Detect files with multiple extensions

I've a synology running a kind of linux OS. I've transfered there a lot of photos. Unfortunately, some are with .jpg and some with .JPG depending of the tool I used to import. These are considered as ...
Skippy's user avatar
  • 13
0 votes
1 answer
46 views

Insert new line if file contain string

I need to insert 'import packagename' to the line after imports. In files which contains the specific word. What I try: find iOS/Chat \ -type f \ -name "*.swift" \ -exec gsed -e "/...
Bimawa's user avatar
  • 101
0 votes
1 answer
223 views

How to do a recursive filename `find` from the shell using a glob pattern with "set braces"

From the shell, I'd like to recursively search a directory for a given glob pattern. But I want to use set-braces-syntax in my pattern: find ~/path/to/dir -name '*.{h,m}' Here I'd like to recursively ...
Todd Ditchendorf's user avatar
0 votes
1 answer
148 views

Pass each find result as an argument with prefix to exec

I would like to find some files and turn them into a chain of arguments for a command. What I have so far is: find . -name '*.yml' -exec cmd -f {} \+ which results in cmd -f ./foo.yml ./bar.yml but ...
milkpirate's user avatar
0 votes
0 answers
1k views

Can I use regex in find path?

env = bash, centos7 My goal is to delete jenkins workspace cache files under specific path, except for today's. Successful command : cd /jenkins/jenkins/workspace/CMSvc_Build/caches/modules-2/files-2....
Lunartist's user avatar
  • 139
1 vote
1 answer
1k views

How to find a character in a string using Powershell?

Using Contains to find a value using PowerShell is not working. Full Story: I have to get the PartNo, Ver, and Rev values from an SQL DB, and check if these values occur in the first line of the text ...
Brute's user avatar
  • 25
1 vote
1 answer
1k views

7-zip windows command to extract .rar from a networkshare recursively but keep files in the dir with the .rar file

Long story short I have one folder on a network share, that has 200+ other folders in them, some of which have .rar files in them. I want to extract all the .rar files IN PLACE. Not to another dir. ...
Taeleus's user avatar
  • 13
1 vote
1 answer
634 views

Searching for multiple line breaks in Notepad++

I have a large text file that I am editing in Notepad++ and want to search for all instances where there are two line breaks and a particular string of characters on the following line (i.e., two left ...
the_sage1313's user avatar
0 votes
1 answer
2k views

Google Chrome Bookmarks File is NOT in the Default Folder Everyone Says It's In -- So Where Is It?

I have hundreds of bookmarks in Google Chrome, on my Windows 10 system, and they all work fine in Chrome, but I want to look at the place where they are on my computer, and I can't find them. I am ...
Richard James's user avatar
0 votes
0 answers
31 views

How to highlight text that is not available as typical HTML Element Text?

We can press Ctrl + F in browser to find a text on the page as it gets highlighted if found a match. Even we can use good browser extensions to define our keywrords and then use the extension ...
Usman Waheed's user avatar
0 votes
0 answers
204 views

Random "The active directory domain services is currently unavailable" error

This error started appearing today, seemingly at random times, while I'm working, browsing or gaming. The following 2 windows open. I tried finding more info using Process Explorer and apparently the ...
keklord's user avatar
  • 195
0 votes
0 answers
104 views

Calling exiftool on a huge number of recovered images from photorec

I am trying to recover images of the last 20 years from a friend. She moved all recent files to trash, then emptied the trash. Those images were lying on the system partition, so photorec found a huge ...
dwn's user avatar
  • 101
2 votes
0 answers
98 views

Testing deleting files over a certain age [duplicate]

I have a server running Ubuntu 20.04.3. On this server there is a process which dumps a MySQL database and then tar's the files once per day for backup purposes. My goal is to write a script which ...
Andy's user avatar
  • 21
0 votes
1 answer
2k views

List all sub-directories with a specific pattern in bash and execute a command

I have a directory like this: . ./foo/.bar/bar/file.jpg ./foo/.bar/xyw/dummy.fil ./foo3/.bar/file.jpg ./foo3/.bar/bar/file.jpg ./fo/bar/file.jpg I'm trying to list all subdirectories that contain the ...
amsou's user avatar
  • 3
1 vote
1 answer
477 views

Copy all files from past 6 months and preserve directory structure (Linux)

I have a folder on a Linux machine that I want to copy for backup purposes. Since it got too large lately, I only want to copy the files that have changed in the past 6 months, but preserve the full ...
Gene Vincent's user avatar
2 votes
0 answers
227 views

How to make fzf respect `FZF_DEFAULT_COMMAND` when using it through `FZF_COMPLETION_TRIGGER`?

As stated in the README, fzf only honors FZF_DEFAULT_COMMAND when invoked directly, and there is a separate setting FZF_CTRL_T_COMMAND. However, when I type a file pattern followed by a completion ...
user102780's user avatar
0 votes
0 answers
52 views

How to find a word only in selected text?

I usually use Chrome browser and I'd like to know how can I find a specific word only in selected text, not in all webpage when pressing Ctrl+F. How can I do it? You can suggest any other browsers if ...
Pranciskus's user avatar
0 votes
1 answer
220 views

search over all drives in git bash crashes - "failed to read file names from file system at or below '/': No such file or directory"

I am using the git-bash for windows (what is internal msys2). I needed to search over all of my harddrives. When I try to run find / -type d (and my search patterns), the search runs over the system ...
Radon8472's user avatar
  • 731
1 vote
1 answer
169 views

regex in find doesn't accept the or operator in group

I'm trying to delete all files and directories in a parent directory, with the exclusion of some directories and their content. For this I use find in a bash script on MacOS. It works if I exclude ...
Philipp's user avatar
  • 13
0 votes
2 answers
259 views

How to delete any files that have not been used (access, change or modify) in X years

i run this command find BAR -type f -mtime +1095 # older than 3 years and find this file: BAR/foo.pdf So i run this: stat BAR/foo.pdf Access: 2020-01-03 01:32:05.584393000 -0500 Modification: 2017-...
acgbox's user avatar
  • 711
0 votes
0 answers
39 views

How does the use of find command result in a permission denied error?

Please have a look at my code: apple@apples-MacBook-Pro ~ % find ./ -name Desktop -type d .//Desktop find: .//Documents/Library: Permission denied Would someone explain to me what does the second ...
jxhyc's user avatar
  • 481
0 votes
0 answers
320 views

Is there an alternative command or way to speed up find in LFTP?

There is an FTP server I'm connecting to, and it could possibly have 20-30k zip files and an assortment of subdirectories. I would like to return a list of all of these files based on their extension, ...
mahbad's user avatar
  • 3
0 votes
1 answer
495 views

GNU `find` error: "find: failed to read file names from file system at or below ‘/’ : No such file or directory"

OS: macOS Big Sur 11.6 I'm trying to find all files on my system that match a pattern so I can delete extraneous files after removing an application. For this purpose the application is RStudio. I'm ...
Leo's user avatar
  • 1
0 votes
1 answer
260 views

How to auto-detect and export all the web links from a MS word file to a separated file?

I have a .docx file that the web links are not underlines and auto-detected as usual. Is there any way to find all the weblinks and export them to another file?
Alex97's user avatar
  • 145
0 votes
1 answer
49 views

Use Excel formula to highlight chosen value from first sheet on the second sheet if matches

Is it possible to highlight chosen value from first sheet on the second sheet if matches? For example, I click on the cell with the value "Map" on the first sheet, and Excel switches to the ...
Roman Park's user avatar
0 votes
1 answer
211 views

Find the most recent file of a type in terminal and then open it (mac os)

I found part of this question in 2 other posted questions, but I cant seem to get the last step working which is just "opening" the file: How do I get files found by command-line 'find&#...
Mix Lab Tech's user avatar
1 vote
1 answer
686 views

Find isn't finding exact match in a string in excel

I wrote a code in vba in which if I enter a string in cell B8 then it will match in other worksheet ranged A6:A500. My finding text is Carlos Leather Fashion*Lefties*Alex*Mid Blue. And there is a ...
Mehedi's user avatar
  • 84

1
2 3 4 5
21