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
0
votes
2answers
49 views

How to delete any archives older than W weeks, but still keep up to N archives?

I have a CentOS 7 directory that gets filled with tar.gz archives for different packages, where each package can create multiple archive versions. I'm trying to find a way to delete any archives ...
0
votes
0answers
14 views

Hxd editor find inside a file by entering some hex search values and without knowing other values [closed]

I have a file with some parts with this hex below that i want find with random numbers hex = 31 00 39 00 39 00 20 00 38 00 33 00 30 00 20 00 35 00 36 00 34 text string of the hex = 1.9.9. .8.3.0. .5....
0
votes
2answers
16 views

Find a file with parts of name in an arbitrary order

I've got a file hidden somewhere, it's either named file.foo.bar.txt or file.bar.foo.txt, but I'm not sure which it is. Right now, I'm just running find file*foo*txt because I know the file will be ...
0
votes
1answer
33 views

Linux Terminal - Copy All Directories with JS or TS files, setting a max depth of each item being copied

I have hundreds of directories, each with one or more .js or .ts files in them but also other files. Many of them are nested multiple levels deep. What I am trying to do is copy each sub directory ...
0
votes
0answers
18 views

Microsoft Excel 2010 - how to mass find and replace parts of hyperlinks [closed]

Excel 2010 find and replace not working for text within a hyperlink. I have a table of hyperlinks to files stored in an excel 2010 spreadsheet with the Text to Display set to a word not the actual ...
0
votes
1answer
27 views

Symlinking with (i.e.) find | sed | xargs without xargs: argument line too long

I got stuck at symlinking using find, xargs and sed. Given folder structure: /abc /def /*/def /builds on my local machine the following statement works. find ./abc \ -type d \ -...
1
vote
2answers
30 views

Accessing parent and grandparent directory from linux find and passing to xargs

I'm trying to do a batch imagemagick conversion on all tiffs in directories. The structure of the directories looks like: test 123 456 image.tif 256 857 ...
1
vote
1answer
43 views

Display dirs tree based on a file content

$ find ./ | tac ./dir1/file -> "abc" ./dir1 ./dir2/file - > "abc" ./dir2 ./dir3/file -> "xyz" ./dir3/dir3_1/file - > "abc" ./dir3/dir3_1 ./dir3 or $ tree ├── dir1 │   └── file -> "...
0
votes
1answer
42 views

Automatically clear “Find what” parameter after using Find and Replace box

Is there any way to clear "Find what" (Ctrl+F) search parameter when after a search using "Find and Replace" on Excel? I realized it is not possigble to use Ctrl+A to select all the text inside the "...
0
votes
0answers
25 views

How can I search with the `OR` operator in Chrome web browser?

Using Chrome's find on page function CTRL+F , how can I search with the OR operator? i.e. search for aaa or bbb within the webpage that Chrome shows? btw , I prefer not to use Extension or plugin
0
votes
1answer
35 views

Word: How to find all years (19xx or 20xx) ending with a closing parenthesis “)”

I'm helping someone do a two-way citation check in an academic paper. What I would like to do is use the Find function to find all instances of citations; all citations should have this format (...
0
votes
1answer
41 views

`find` equivalent which supports .ignore files?

I frequently need to find files matching a certain name or type within a bundle of git repositories on my workstation. Some subdirectories within that bundle are only readable by root, though, so any ...
0
votes
1answer
92 views

Perform operations on the output of find command with -exec options

I want to perform operations on the files found by the find command which already has a -exec option. find . -type f -exec zgrep -li "4168781103" {} + Output: ./results/...
0
votes
0answers
25 views

Using find to move files with specific conditions

How do I write a find script that moves files in a specific directory two levels up but only if nested below that specific directory? For example...My ipcamera saves files to my NAS in a very poor ...
0
votes
2answers
21 views

“find” command does not find

I know I have the file /etc/ssh/sshd_config. I wanted to find it because I didn't remember the path. Referring to this, https://linux.die.net/man/1/find , and some comments of people with the same ...
0
votes
1answer
34 views

VBA Macro find and replace

I am looking to make a macro that uses the find and replace function using data in a two column table (Column A and Column B), that replaces everything that contains data from Column A in the rest of ...
1
vote
1answer
44 views

Using Windows Command to search multiple folders for a file and to copy it to another location

I have multiple files in a folder: P:\Management_System There are multiple sub folders inside my folder Management_System. I am trying to see if it's possible to search for a file by it's name e.g ...
1
vote
0answers
25 views

sorting out files to different directories from a main directory

I have numerous files I am trying to move from a main directory in to separate directories which have multiple sub-directories inside. Example file naming conventions 1SA_1BA_1W.out, 2SA_3BA_3W.out, ...
3
votes
1answer
65 views

Find file on hard drive and delete if it exists

A legacy program created a file at one of two locations, either inside C:\Temp\*\FileToRemove.txt or C:\Windows\Temp\*\FileToRemove.txt, and I need to remove this file from the computers on the ...
0
votes
1answer
38 views

Removing lines from files with a specific extension

The task is as follows: From all *.h and *.cpp files, delete lines beginning with /. Removing from the current directory (or from the specified one) works well, and if there is a subdirectory in the ...
0
votes
0answers
28 views

use find command to recursively convert directory with ffmpeg [duplicate]

I've asked this question almost a dozen times and it seems to stump everyone. I've come a little closer - but still not close enough to the solution. I want to recursively convert .mp4 to .png (1 ...
0
votes
1answer
93 views

use find command for recursive conversion using ffmpeg

How can I use the following script to recursively convert a directory containing .mp4 to .png (1 frame only). Right now it only converts the directory. It's not recursive. for i in *.mp4 do name=`...
0
votes
2answers
42 views

Speeding up find command result with folder exclusions

I have the following folder structure: Approvals_Share 1 CUST APPROVAL 2 LICENSE APPROVAL CANADA INSCRIBE z-remove There are multiple subfolders and illustrator files “.ai” inside ...
0
votes
0answers
28 views

Send files created in last minute with sftp one line?

I would like to SFTP files with a .json only files created in the last minute. For context: the machine I'm using has no internet connection, so I cannot install additional packages through yum, the ...
1
vote
0answers
49 views

How to ignore FIND errors in bash script?

I'm using a script to cleanup logfiles from a tomcat webserver. Problem: find $file_pattern will return an error if a filepattern did not match any results. The following is run by crontab: ...
0
votes
2answers
426 views

How can I rename files in folders, while keeping part of the name unchanged?

I have multiple files (about 1000) named as such: db_1582779454_1582778086_69_2BB5873B-84B0-424B-9A1A-F648EE7CD5FA db_1582037529_1579666328_6_03C074E4-6BB9-434A-B95D-4FE29787060C ...
0
votes
1answer
21 views

Using awk regular expression with gnu find

I am comfortable with AWK regular expressions and would like to use them in GNU find. Searching find's manpages I found there are two options called -regex and -regextype which seemed relevant. So I ...
3
votes
1answer
93 views

How do I search for a word/phrase between page x and page y of a PDF file?

While working with a 700+ page PDF for school, I need to search for words/phrases in the current chapter we're in but most "Find" features on PDF viewers will give me results from all over the PDF. ...
1
vote
2answers
83 views

Best way to compare two very large directories in Linux

I need to compare two directories on Linux filesystems on two separate servers in order to identify whether all the files from SERVER1 are present on SERVER2. The total data set is about 4TB of files ...
3
votes
1answer
131 views

How does this find state actually work in moving a file up one directory?

Can someone explain how the string manipulation in this find statement actually works? My head is about to explode trying to figure it out. :-o From: UNIX shell scripting: how to recursively move ...
0
votes
0answers
69 views

Strange misbehavior of 'find'

WGroleau@MBP-WWG Music % Music find * -type d -name "*Andy*" -print ……/Patsy Cline/The Definitive Collection/13 Imagine That.mp3 I've used this method of locating a directory many times, and have ...
0
votes
2answers
53 views

Excel 2016 find/match

I'm trying to write a formula that can return an array based on if each value in a range can be found within a set found in another range. For example, if I have: a range A2:A7 with text values 1,2,3,...
0
votes
1answer
69 views

How to find all files,with substring, e.g. xyz (caseinsensitive) in filename within particular type (*.txt) using linux command line?

I have some bunch of files, which has "xyz" in the filename, This "xyz" can be case insensitive, e.g. "XYz" or "xYz". Wish to display all possible combination of the files in from current working node
0
votes
1answer
11 views

Count cells in a column between repeated value to find the family size

Have Family data in excel as shown in image. Have to Find out Family size. Please Suggest the formula. Thanks enter image description here
1
vote
2answers
343 views

`find` with `rename` – No such file or directory

I want to remove dot in filenames in subdirectories. I use rename and find: find . -type f -name '*.avi' -exec rename 's/\.(?=[^.]*\.)/ /g' {} \; The command find works alone. The command rename ...
1
vote
3answers
79 views

Get the total size of all files of a given extension

I'm trying to get the total size of all the JPEGs in a particular folder, but no amount of combinations of options while piping to du seems to make this work: find -type f -iname "*.jpg" | du -sch ...
3
votes
1answer
2k views

Combining find grep and tail

I am trying to find all files that start with a certain name, then go through each file to find lines that contains a string, then only print out the last line of each file that contain the string. ...
0
votes
4answers
160 views

Detecting corrupted JPEGs: using find -exec with || logical operator

find . -maxdepth 1 -type f -exec identify -regard-warnings -verbose {} > /dev/null 2>&1 + || mv "$1" --backup=numbered {} -t "./Corrupted" I'm trying to use the above to check for the ...
1
vote
1answer
29 views

How to Replace in RegEx Notepad++

I cant seem find any answers on this but how does one find and replace in notepad++. For example: I am trying to find all lines that contain 4 pipes between the amount and name. How can I find this ...
0
votes
1answer
76 views

Efficiently Fixing Ownership, Group Membership, and Mode Problems on an Extremely Large NFS Share

I am fixing ownership, group membership, and mode problems in an entire directory tree (except for two particular subdirectories) accessible to me only via NFS. This directory tree contains tens of TB ...
3
votes
1answer
321 views

ImageMagick failing to match images lower than given dimensions

This is a follow-up question to this one. So far, I've cobbled together the following find command, which is intended to print (and once properly tested, -delete) all JPGs that are 200 x 200px or ...
0
votes
1answer
160 views

Use find to delete all images under given dimensions

I just used Recuva and Photorec to recover some data off an accidentally-formatted drive. Naturally, the result is every intact file that ever existed on the drive during its lifetime. This means tens ...
0
votes
0answers
41 views

ubuntu 19.10: open file from dashboard

touch ~/xyz sudo touch /srv/abc If open the dashboard and I type xyz, the file is found (dashboard capture). Instead if I type abc, nothing relevant is found, but there are only a few things that do ...
0
votes
1answer
22 views

Trying To Get My Regex Logic Right In a Find Command to Change File Names

Please forgive me, I'm a shell noob. I need to rename a lot of directories, and would usually use a GUI utility for this, but my server access is via SMB over two VPN's, there are tens of thousands of ...
0
votes
2answers
56 views

find command does not work the way around

If I do: find / -name '*image*' it outputs all files and dirs containing 'image' in their names: [...] /usr/share/mime/image/x-sun-raster.xml [...] /usr/include/qt5/QtGui/5.11.1/QtGui/private/...
0
votes
0answers
31 views

cannot exclude some paths using find command

beeing in my home directory, I want to find all files within my current directory excluding these 2 directories: ./.mozilla ./.cache/mozilla following this solution: https://unix.stackexchange.com/...
1
vote
1answer
80 views

How To Find Installed Programs on Windows 10 e.g. Git Bash?

I've often found it hard to find programs after I've installed them on Windows 10, pinned/made a shortcut to their executable, then deleted the shortcut to remove clutter. My first approach is to ...
0
votes
2answers
39 views

Using regex groups with find

Given a list of files, I want to find all the ones ending with either .pem or .cer. This command works to find the PEMs. find . -d 1 -regex ".*\.pem" But this command finds nothing: find . -d 1 -...
1
vote
0answers
43 views

MS Word: Why isn't this wildcard find and replace working as expected? [screenshots inside]

Here I want to replace "80–90%" with "80%–90%". But when I run replace, this is what it puts out. Shouldn't it output "string 1 (the 0), a percentage sign, an en dash, and string 2 (the 90%)", in ...
1
vote
1answer
51 views

How to force linux to print full path along with timestamp while using find

I need to store the full path of a specific file found through find (and successive piped operations on find results). I'm using this: find "$PWD" . -iname p_*.raw -printf "%Tc %p\n" | sort | cut -f ...

1
2 3 4 5
19