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
1answer
16 views

Look for a directory that contains two files of which the names are known

I wrote some code a while ago, and stored it in main.c. I then compiled it to test, and left it for a month or so while I waited for a use case to run my test. This is a shared server, so things get ...
4
votes
1answer
172 views

Subshell won't work as indented

I have some files like this: ├── abc.conf ├── def.conf ├── xyz.conf ├── 10-abc.conf.postix ├── 10-def.conf.postix and I want to remove the .postfix from all files which starts with 10-. To do this ...
0
votes
0answers
6 views

Archive all files with specific extension without full structure [duplicate]

I'm trying to tar all .log files in /var/log directory. But i need to tar only the files without the directories names i have done this so far : sudo find /var/log/ -name '*.log' | sudo xargs tar --...
1
vote
1answer
14 views

How to use “find” or “search” function on formula not on values/results

I am trying to create an Excel test for begginers but in order to automatically check the answers I plan to put IF/AND function, to check correct result and to check if propper function is used, but ...
0
votes
0answers
14 views

Can I exclude some folders when using the “find” macOS terminal command?

When using the terminal command "find /directory path/ -type f | wc -l" is there an argument that I can insert that will exclude from the count any folders with a specific name (and thus ...
0
votes
0answers
6 views

Files not seen after complete scan for recovery with Easeus data recovery [duplicate]

I formatted by Desktop drive, I used Easeus data recovery during scanning all files will be showing, but after completion, I can't find all files
0
votes
2answers
48 views

find -exec with wildcard

I am trying to use bash 'find' to process all folders that contain a .log file and get their sizes. However the wildcard is not working as expected. This returns nothing: find . -type d -exec test -e ...
1
vote
1answer
22 views

How to find “#VALUE” cells in Excel?

In Excel 2007 I have two sheets: sheets1 with data sheets2 links with some formulas data from sheets1 If a formula does not work in sheets2 I have cell that shows #VALUE!, but in the bar I can see ...
1
vote
2answers
45 views

How can I modify path coming from {} in `find -exec`?

I've been reading quite a few posts howto find files and copy those. What I want to achieve. Copy all *.jpg files from every directory to one directory. To avoid overwriting my intention is to add or ...
0
votes
0answers
11 views

Why does find | xargs vi act this way? [duplicate]

Running find . -name index.html | xargs vi instead of, say, find . -name index.html -exec vi {} +, seems to do what I want, but with some odd side-effects: backspace prints the delete character ^?, ...
0
votes
0answers
16 views

How to cancel invalid panelize command in Midnight Commander

I'm trying to use the panelize command in Midnight Commander, but I typed an invalid command: grep execute -- $(find /var/www/html/magento2/ -ipath Controller/) If I type the command in Bash, it ...
0
votes
1answer
37 views

Why find is giving inaccurate responses for 1M and 1G size?

Why find is giving inaccurate/weird responses when I try to look for files that are 1 megabyte size or 1 gigabyte size ? Or even less than 1 megabyte or 1 gigabyte. [root@server1 ~]# ls -lh total 7.8M ...
1
vote
2answers
99 views

Generalized chmod function differentiating between directories and files (i.e.: with find)

Is there a generalized bash function available that mimics chmod in every aspect, except that it also let's me differentiate between files and directories? I know there's already numerous examples ...
0
votes
1answer
30 views

How to start fzf from another directory than the current working directory?

I often use fzf to navigate the filesystem, especially the Alt-c key binding. When invoked, fzf generates a list from the current working directory. Is it possible to make fzf generate a list from a ...
0
votes
1answer
26 views

“find” using LFTP tries to access arguments

I connect via lftp -u username, sftp://server.name.com:/directory to a sftp-server, which works correctly. Anyhow, I want to use find. -name *someWildcardExpression -type f -delete in order to delete ...
0
votes
1answer
22 views

move folders recursively using find

Please see the below issue. Actually I wanted to move only 20022021 folder (which cotains subdir and files) to the destination, But its moving both the directories. nasa:/# find /tmp/source -mindepth ...
0
votes
1answer
30 views

(short form to) Ignore multiple filename patterns using “find”?

It seems I can ignore a certain filename pattern (*.dll) on find search by doing find ! -name '*.dll' And ignore multiple patterns by doing $ find . ! -name '*.h' ! -name '*.cpp' ! -name '*.dll' Is ...
2
votes
2answers
71 views

which are the ways to find new files in a server location

I'm trying to find new file(s) created, copied, moved or modified in latest hour in a linux server location /home/user/. I would like to know if the following command is the best way covering all ...
2
votes
2answers
129 views

Skip files with no match in (Windows) find command

Is it possible to make the Windows find command output ONLY when there are results found? Having such simple search command: find "str1" *.* regardless of the "str1" string is ...
0
votes
1answer
36 views

Find gaps in sequentially hex numbered file names in Linux

I have folders containing files with sequentially numbered file names (hexadecimal): 00001a08 00001a09 00001a0a 00001a0b <--- 00001a32 00001a33 Is there a way using linux tools to find gaps in the ...
1
vote
0answers
28 views

Equivalent symbols when finding text on a page (“Find”/Ctrl+F, Chrome/Firefox)

When searching for specific text on a webpage using the "Find" / "Find in this page" function (a.k.a. Ctrl+F), Firefox and Chrome distinguish between ASCII "-", Unicode ...
1
vote
2answers
84 views

Recognize, find and delete duplicate words in a txt or doc file

I received a few text documents with thousands of words in them (each word is in a line). I'm sure there are duplicate words and need to delete those duplicate and just remain a single of them. I copy/...
0
votes
1answer
20 views

How do I look for a word, which letters are seperated by spaces?

I want to grep over pdf files for specific search terms. I'm using pdfgrep for this task, which works quite fine. However, sometimes words are specified with spaces between each letter. E.g.: ...
0
votes
0answers
16 views

Replacing multiple workbook links in Excel

I have two different files, dmy.xls and dmy1.xls that are being linked to the same main spreadsheet in Excel. I am trying to find all the instances in the spreadsheet of dmy.xls and replace it with ...
0
votes
1answer
82 views

Why is “find -mtime +2” not showing files older than 48 hours

Any idea why -mtime +2 didn't return test file. What I understand is +2 will return all file older than 48 Hrs. $ pwd /tmp/20122020 $ ls -rlt total 0 -rw-rw-r-- 1 dmsjboss dmsjboss 0 Dec 17 21:34 ...
2
votes
4answers
334 views

Find top N oldest files on AIX system not supporting printf in find command

I am trying to find a solution similar to the one used below to find the Top N oldest files (modification time) on my AIX system starting from a given directory and digging though all sub-directories ...
0
votes
1answer
33 views

Find hidden files in non-hidden directories

Consider following directory structure: $ find m m m/f.sh m/.a I want to find hidden files in non-hidden directories with: find . -not -path "*/.*" -and -name "*.*" . ./m/f.sh ...
0
votes
1answer
38 views

Recursively renaming files under subdirectories with the directory name with Linux rename

Problem statement: I have a number of directories, corresponding to series names, and random filename underneath each, as follows: Title.S01E01/1234abc.mkv Title.S01E02/5678def.mkv Title.S01E03/...
0
votes
0answers
15 views

Remove multiple files using “find” asking yes to every finding

I'm trying to remove multiple write-protected files but i'm struggling answering "yes" to the prompt. The find command is this: find /media/openhabian/pelis -atime +6 \( -type f -iname "...
0
votes
2answers
121 views

How to exclude dot underscore ._ files when using `find`?

I'm using this command: ls -R |find . -name "*.avi*" -or -name "*.mp4*" -or -name "*.mkv*" > movies.txt The problem is the movies are listed twice! Example: ./_NEW/...
1
vote
1answer
52 views

Understanding Operators in find command

[kony@HOSTNAME testing]$ pwd /apps/kony/fmw/testing [kony@HOSTNAME testing]$ touch SCCS [kony@HOSTNAME testing]$ touch NOT_SCCS [kony@HOSTNAME testing]$ [kony@HOSTNAME testing]$ find . -name SCCS -...
1
vote
1answer
50 views

Getting a “FIND: Parameter format not correct in make” when trying to build a repository from source code

I'm trying to build a repository from source using GNU make but this line of code src_js := $(shell find src -name '*.js') gives the error: FIND: Parameter format not correct What is the mistake ...
0
votes
0answers
17 views

Unable to find/detect wireless adapter

I'm trying to help with a friend's pc. We cannot find the wireless adapter. She does not have the possibility to look for available wireless networks. They don't remember for how long it's been going ...
0
votes
0answers
13 views

How to deal with Umlauts in LC_ALL=C find . -name '*[! -~äöüÄÖÜ/.]*'

I'm trying to identify files with fuzzy filenames on macOS 10.15 LC_ALL=C find . -name '*[! -~äöüÄÖÜ/.]*' works to a certain extent, but there is a puzzling problem with umlauts. For whatever reason ...
1
vote
1answer
113 views

SED find and replace by keeping indentation

I can't seem to find an answer, I am trying to find and replace a text. For example, find newName: and replace it with a variable that expands. I tried: sed -i "/ newTag:/c newTag: $IMAGE_TAG&...
0
votes
1answer
27 views

Find number of files that contain certain String

I have a directory containing a vast amount of xml files. I would now like to find the number of files (and optionally the names of said files) that contain a certain string. XML tags do not really ...
1
vote
1answer
20 views

Windows search for a given directory containing a given file

So, I have an old project, let's call it my_project. Now, I would like to work on it again, but I find that the file index.html is missing. I have extensive backups, including k:\backups\localhost\...
0
votes
0answers
13 views

Trying to delete all files and keep the latest from all sub directories

I have backfolders that looks like these: /backups/SQL/2020/03 /backups/SQL/2020/04 /backups/SQL/2020/05 and in each, I have 6 files with similar names (snapshots taken every 3 hours) I want to run a ...
0
votes
1answer
63 views

How to use “find” to print the path instead of “grep” in case of matching file contents

For example, I need to print the paths of all the user's files that contain the word hello. Must use find Use the find command to search, and grep to print the path: find ~ -type f -exec grep -lis &...
0
votes
1answer
16 views

Need to find in all system files that are less than 7 days old, starts with “L” and are .txt, then generate an output file based on that

I’m working with Ubuntu and need to find in all system files that are less than 7 days old, starts with L and are .txt, then generate an output file based on that. This is what I have so far: nohup ...
0
votes
0answers
35 views

How to recursively rename, sort and move incoming PDF files from subdirectories

I have a program that periodically downloads certain publications in PDF format as they become available, along with additional files (e.g. *.nfo), which I don't need. The program places the incoming ...
1
vote
1answer
12 views

Trying to copy files with multi-patterns from directory to another directory?

I am trying to copy all files that start with specific pattern from directory to another directory I tried using the command below, cp 8405T* 1208T* 1783T* 6321T* 9269T* 479T* 1743T* 6527T* 6153T* ...
0
votes
1answer
15 views

Tail log and output top processes upon encountering string fails

I am running the following command to tail a log file and output top processes to a file upon encountering a given string: tail -f mylogfile.log | awk ' /server on fire/ { system("...
2
votes
1answer
116 views

Change color of ctrl + f search results in chromium

i'm looking for any way to change the yellowish stock color of ctrl + f search results in chromium based browser (opera in my case). I tried to research this topic, but i didn't find any way to do ...
0
votes
1answer
29 views

Exclamation Points - Is there a linux bash command to find and delete all directories named “!example” (and their contents)

I have searched and searched for an answer to this question, and I have used some of the answers I found in the past for finding and deleting large numbers of directories that are named by a certain ...
0
votes
1answer
54 views

How to check the directory size using find command?

I would like to list the directories which is having size more than 10MB. I tried the same using find command but find command is not giving result with size and type option. It is working with any of ...
1
vote
2answers
282 views

I'm trying to use wmic to find a specific USB drive and then set an environment variable

I can find the drive with the following wmic command: wmic logicaldisk where VolumeName='USB-BACKUP' get deviceid |find /v "DeviceID" it returns Q: and that works a treat. However, I also ...
1
vote
1answer
142 views

How to make `find` return relative paths?

I find this task: Find all files in the directory ​ /srv/SAMPLE002​ with a file extension of ​ .tar . Write a list of matching filenames, one per line, to the file /opt/SAMPLE002/toBeCompressed.txt​, ...
1
vote
1answer
81 views

Recursively search files with exclusions and inclusions

I would like to use find to recursively search files and print them to a file. I imagine a command like this: find /local/data/ --exclude 'database/session*' --include='database/session_*.db' > ...
0
votes
2answers
21 views

Microsoft Office / Word: How to find text between /* and */?

I have a Microsoft Word (Office 365) document with some java code in it: Java code... /* Comment 0. dog 1. cat 2. cow */ Java code... What I would like to do is set the font color of ...

1
2 3 4 5
20