tagged [find]

How can I find all *.js file in directory recursively in Linux?

How can I find all *.js file in directory recursively in Linux? In Linux, how can I find all `*.js` files in a directory recursively? The output should be an absolute path (like `/pub/home/user1/folde...

8 Dec at 04:37

FileNotFoundError: [Errno 2] No such file or directory

FileNotFoundError: [Errno 2] No such file or directory I am trying to open a CSV file but for some reason python cannot locate it. Here is my code (it's just a simple code but I cannot solve the probl...

9 Mar at 13:28

Best way to find position in the Stream where given byte sequence starts

Best way to find position in the Stream where given byte sequence starts How do you think what is the best way to find position in the System.Stream where given byte sequence starts (first occurence):...

24 Sep at 14:17

finding closest value in an array

finding closest value in an array For a target number, I want to find the closest number in an array. For example, when the target number is 13, the closest number to it in the array above is 15. How ...

23 May at 13:25

Find duplicate lines in a file and count how many time each line was duplicated?

Find duplicate lines in a file and count how many time each line was duplicated? Suppose I have a file similar to the following: I would like to find how many times '123' was duplicated, how many time...

13 Aug at 19:26

C# find exact-match in string

C# find exact-match in string How can I search for an exact match in a string? For example, If I had a string with this text: label label: labels And I search for label, I only want to get the first ...

9 Nov at 07:48

find -exec with multiple commands

find -exec with multiple commands I am trying to use find -exec with multiple commands without any success. Does anybody know if commands such as the following are possible? Basically, I am trying to ...

25 Feb at 17:18

Use find command but exclude files in two directories

Use find command but exclude files in two directories I want to find files that end with `_peaks.bed`, but exclude files in the `tmp` and `scripts` folders. My command is like this: But it didn't work...

3 Jan at 02:42

How can I check if character in a string is a letter? (Python)

How can I check if character in a string is a letter? (Python) I know about `islower` and `isupper`, but can you check whether or not that character is a letter? For Example: Is there any way to just ...

5 Mar at 19:57

How can I exclude all "permission denied" messages from "find"?

How can I exclude all "permission denied" messages from "find"? I need to hide all messages from: I am experimenting when such message arises. I need to gather all folders and files, to which it does ...

Find all stored procedures that reference a specific column in some table

Find all stored procedures that reference a specific column in some table I have a value in a table that was changed unexpectedly. The column in question is `CreatedDate`: this is set when my item is ...

26 Jun at 14:20

Delete files older than 10 days using shell script in Unix

Delete files older than 10 days using shell script in Unix I want to delete scripts in a folder from the current date back to 10 days. The scripts looks like: The script will run in every 10 day with ...

29 Dec at 03:22

Find text in string with C#

Find text in string with C# How can I find given text within a string? After that, I'd like to create a new string between that and something else. For instance, if the string was: And I want to creat...

21 Jan at 08:9

How can I find a file/directory that could be anywhere on linux command line?

How can I find a file/directory that could be anywhere on linux command line? Ideally, I would be able to use a program like to report the paths with matching filenames/directories. Unfortunately this...

20 Jan at 16:19

Linux command: How to 'find' only text files?

Linux command: How to 'find' only text files? After a few searches from Google, what I come up with is: which is very unhandy and outputs unneeded texts such as mime type information. Any better solut...

10 Jan at 07:37

Find methods calls in Eclipse project

Find methods calls in Eclipse project I have a class X containing method myMethod(). I would like to find locations in all projects in my current workspace where this myMethod() is being called. I can...

11 Mar at 04:37

How do I get the find command to print out the file size with the file name?

How do I get the find command to print out the file size with the file name? If I issue the [find](https://en.wikipedia.org/wiki/Find_(Unix)) command as follows: It prints out: I want to 'print' the n...

18 Jan at 17:21

How can I find a specific element in a List<T>?

How can I find a specific element in a List? My application uses a list like this: `List list = new List();` Using the `Add` method, another instance of `MyClass` is added to the list. `MyClass` provi...

20 Oct at 08:58

How can I get a recursive full-path listing, one line per file?

How can I get a recursive full-path listing, one line per file? How can I spit out a flat list of recursive one-per-line paths? For example, I just want a flat listing of files with their full paths: ...

15 Nov at 18:13

C#: Searching a text in Word and getting the range of the result

C#: Searching a text in Word and getting the range of the result I can find a text in a Word file via: ``` Word.Range range = wordApp.ActiveDocument.Content; Word.Find find = range.Find; find.Text = "...

7 Nov at 05:14

Scala check if element is present in a list

Scala check if element is present in a list I need to check if a string is present in a list, and call a function which accepts a boolean accordingly. Is it possible to achieve this with a one liner? ...

10 Jan at 21:30

How to pipe list of files returned by find command to cat to view all the files

How to pipe list of files returned by find command to cat to view all the files I am doing a [find](https://www.man7.org/linux/man-pages/man1/find.1.html) to get a list of files. How do I pipe it to a...

7 Nov at 12:30

How to check if a value exists in a dictionary?

How to check if a value exists in a dictionary? I have the following dictionary in python: I need a way to find if a value such as "one" or "two" exists in this dictionary. For example, if I wanted to...

1 Jun at 19:21

find: missing argument to -exec

find: missing argument to -exec I was helped out today with a command, but it doesn't seem to be working. This is the command: The shell returns ``` find: missing argument to `-exec' ``` What I am bas...

19 Jun at 03:59

How do I find all of the symlinks in a directory tree?

How do I find all of the symlinks in a directory tree? I'm trying to find all of the symlinks within a directory tree for my website. I know that I can use `find` to do this but I can't figure out how...

18 Jan at 12:5