Questions tagged [file-search]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
65 views

find command does not find the file in /sys/devices/ recursively

I'm using find to find the file cpuinfo_max_freq in the the directory /sys/devices/ This is the command I used, it's not showing me any output: find /sys/devices/ -name 'cpuinfo_max_freq' I also ...
0
votes
1answer
100 views

Search inside files with Nemo?

Is it possible to search the content of files in Linux Mint Debian Edition 4? Is this functionality implemented in Nemo or can this only be done in the terminal? If so, how? Problem: I need to find a ...
0
votes
0answers
20 views

how to find specific type of file that are modified within a certain range of dates

There are many questions here that seek files modified within a certain date range. How do we use linux (Ubuntu) command line to search for a certain type (e.g. *.odt) file within a certain date range?...
0
votes
2answers
31 views

List files in directory recursively and what they contain

I'm trying to find all the values stored in files in a directory. I can cat /some/dir/* but that just gets me something like 1 2 3 4 What I want is something like /some/dir/file1: 1 /some/dir/...
0
votes
1answer
65 views

Find all files with character: �

Have a massive codebase (2Gb mostly code) where valid utf8 symbols in German were replaced by this symbol: "�" Is there a way I can find all files that contain this reliably? Visual Studio Code does "...
0
votes
1answer
449 views

How to search for hidden files and folders in dolphin?

I'd like to be able to search for hidden files and folders in dolphin. Currently I was trying to search for backups of the .bash_history file but no results showed up despite hidden files being set ...
0
votes
4answers
67 views

How to determine whether a file is duplicated but has a different name? [duplicate]

Say you have one file called foo.pdf. How can I find out whether my machine contains another file, say bar.pdf, that has the exact same content but just a different name?
3
votes
2answers
178 views

get count of a specific file in several directories

I have a directory structure as follows: dir |___sub_dir1 |_____files_1 |___sub_dir2 |_____files_2 |___sub_dirN |_____files_N Each sub_directory ...
0
votes
0answers
71 views

MX Linux 19 File Search Issue

I just encountered an annoying issue, for which I am looking for a clean solution: I have a system drive and two mounted NTFS-HDD-partitions. These are mounted in /media/. When searching files on the ...
3
votes
3answers
153 views

Search for arbitrary files but only list matches in results once

I want to search for arbitrary file/directory names, but only want to list file paths containing the search string at the same position once. Especially not every file within a directory matching the ...
-1
votes
1answer
21 views

How to find all files that contain the + sign on a directory recursively?

I have tried many suggestions but nothing worked. I have to find all files containing + signs anywhere on the name, like: Hello + World.jpg A + good + file + name + to + find.png Using Ubuntu 16.04 ...
1
vote
1answer
618 views

Is there a command to start Nemo file manager and search for files?

Nemo is good at searching for files and folders. I use Nemo file manager in Xfce and would like to add the Nemo file-search action to WhiskerMenu in the same way Catfish is integrated to Whisker Menu ...
0
votes
2answers
52 views

show number of files not matching certain file name pattern

I have some non standard and standard filenames like the ones below . I need to get the count of files that are NOT standard.. Standard file names: XYZABC.txt, XYZABC.csv, *.msg Non standard file ...
0
votes
0answers
103 views

BASH Script to find files of multiple types

I switch a lot of people from Windows to Linux. As we all know, not all files on Windows end at their intended location (i.e.: the Downloads folder). I'd like to run a BASH script to search for all ...
0
votes
1answer
150 views

how can i make grep/find/locate beep as it finds each match

I am looking for files, since I added a backup external HD. I want to continue working elsewhere, while find/grep/locate find a file. As a match is found, I'd like to be alerted so that i can stop the ...
3
votes
4answers
288 views

bash command to create array with the 10 most recent images in a dir?

I'm writing a bash script and I need to create an array with the 10 most recent image files (from new to old) in the current dir. I consider "image files" to be files with certain extensions, like ....
4
votes
2answers
412 views

Searching for a string that contains the file name

I have a large set of files in a directory. The files contains arbitrary text. I want to search for the file name inside that particular file text. To clarify, I have file1.py.txt (yeas, two dots .py....
-1
votes
1answer
67 views

Search for a string in lots files in a directory, if found, save the file name and line

I have several files, with different names. no specific format for them. But all are .txt. For example: example.txt flower.txt abc.com.txt They are in the same directory. I want to search for a ...
0
votes
2answers
567 views

How to list all filenames in the system [closed]

I want to perform checks on all files in the system. For that I need the full paths of all files in the system. My initial idea was to do something like this: for file in $(sudo find / ); do if [ -...
0
votes
3answers
1k views

How to match for an empty string in a grep pattern search?

I have a set of files containing boot variables from several cisco switches in the network. I have an requirement to filter only the switches with the boot variable empty on the next reload and print ...
4
votes
1answer
683 views

How to grep '$$$$$'? [duplicate]

I want to check the absence of the following sequence of characters $$$$$ (i.e., 5 dollar signs) in a json file using grep as it has been used instead of comma to separate fields and I need to make ...
1
vote
4answers
901 views

RegEx for matching strings in 2nd and 5th columns using grep

I have a file (test.txt) that contains string such as: name1,6.5.8.12,specs1,version1,['66.55.89.12'] name2,19.13.13.159,specs2,version2,['13.13.173.59'; '14.19.232.42'] name3,141.101.196.40,specs3,...
1
vote
1answer
1k views

Bash: search for keywords PDF files and return pages [duplicate]

Hopefully somebody can help me out with this, I'm looking for a small script which does a keyword search in a PDF file (actually a folder of PDF files), and it needs to return all pages including the ...
6
votes
3answers
21k views

Search for special characters using grep

I want to search for the lines that contains any of the following characters: : / / ? # [ ] @ ! $ & ' ( ) * + , ; = %
1
vote
1answer
1k views

Find files created by UID during last 5 minutes

Is it possible to scan entire filesystem (or some recursively some directory) for files created by user with specific $UID created during last 5 minutes ? For examle, `show me files from /home/ ...
0
votes
1answer
13 views

Recent activity is not recorded or lost

A couple of days ago I started to experience issues with search/activity log on my Arch Linux system to be precise what I mean I'm using search tools like Synapse and basic one from Cairo Dock both of ...
1
vote
3answers
89 views

Simple CLI tool for searching

Is there a CLI tool similar to gnome-search-tool? I'm using locate, but I'd prefer that it grouped results where directory name is matched. I get a lot of results where the path is matched which is ...
2
votes
4answers
754 views

How do I search files using grep for multiple strings (intersection search)

How do I use grep to search a nested directory structure for files containing all words in my search pattern? I want to grep for files that contain multiple words - let’s use foo bar and bah. I can ...
4
votes
3answers
195 views

Fuzzy searching for words close to each other

Given a small group of words (for concreteness, say 3), but more generally n, I want to search a file for occurrences of two of those words being close to each other. By close, let's say that the two ...
10
votes
5answers
26k views

Why is the command “find | grep 'filename'” so much slower than “ find 'filename' ”?

I tried both commands and the command find | grep 'filename' is many many times slower than the simple find 'filename' command. What would be a proper explanation for this behavior?
1
vote
1answer
7k views

Replacing a Part of URL String in a Linux File With Another String

I have an HTML file on a Linux server that contains a long list of links. I am trying to edit this file as follows. Find original occurrences of this type: http://www.test.org/name Replace them with: ...
1
vote
0answers
59 views

Is there a content search program/port (*not* index based) that's efficient for files needing text extraction filters

If using FreeBSD as a file server for windows clients, it's useful to be able to run file searches server-side rather than client-side. A typical example might be: find all files meeting some ...
1
vote
2answers
1k views

How to use the grep command to search all Urls in a database file except hyperlinks and http://www.example.com and store it in a different file

I have a database file called prod_database.sql and I wanted to search all Urls in that file except hyperlinks* and http://www.example.com and wanted to store the results in a file. Hyperlinks pattern*...
3
votes
1answer
236 views

How to use soundex search in file searching?

I have a directory that contains numerous files. Moreover, I forget exact file name. So, when I want to find a file I don't find it. If there is any tool that use soundex algorithm for searching ...
2
votes
4answers
12k views

How do I search files and folders on Linux Mint 18.1 Cinnamon?

I switched over from Windows 7 Ultimate to Linux Mint 18.1 Cinnamon a few days ago, and I wanted to search files and folders in my Home directory using the menu, but nothing happened. It seems like ...
-1
votes
2answers
135 views

Multiple years grep [closed]

How can I grep exact years in my file which contains world champions from years 1950-2000 but I want only years 1950/60/70/80/90/00? Thank you so much
2
votes
1answer
2k views

Find files by change date [duplicate]

I'd like to search recursively for files with a specific Change date. Note, this is not the Access or Modify date, but the Change date as outputted by stat. #stat prototype.js File: `prototype.js' ...
0
votes
1answer
44 views

Loop round folders to find and list which folders contain a file excluding a keyword, in bash?

I want to loop through thousands of folders all which contain a file called output(foldernumber).txt and check which of these output files DO NOT contain a keyword and have the script write out a list ...
7
votes
4answers
5k views

Trying to use `pwd` inside an alias giving unexpected results [duplicate]

If I want to search a file in the system I use the following command: sudo find `pwd` -name filename.ext I want to make an alias for an easier word like search, so I used the command: alias search "...
1
vote
1answer
520 views

How do I find multiple file types in one search?

I have done lots of searching about this, but I cannot seem to find an answer that satisfies my needs. I want a simple way to search for two file types or more (e.g. *.mp3, *.aac, *.pdf, etcetera.) I ...
1
vote
1answer
813 views

How to search-replace-backup files recursively in linux?

I'd like to recursively search for a string within all files in a folder. If the string was found, backup the file to the same location (copy to <filename>-orig) and replace the found string ...
2
votes
1answer
135 views

'cd' complexity on ext4

In order to store attachments, a /path/to/atts/ directory will have numerous child-directories (product IDs) created (from 1 to ~10,000 or maybe more in the future), and in each of this subdir, 1 to ~...
0
votes
2answers
56 views

searching a file [closed]

I want to find in the system a file, and I know part name of it. How could I do that? I tried unsuccessfully the command: find / "*partname*" The problem is probably very easy however I cannot find ...
5
votes
1answer
5k views

more less …skipping… when searching

When I search a file in less or more, it will remove lines and replace them with "skipping". Does anyone know what causes this and/or how to avoid it? After I '/' search a log file using either more ...
1
vote
1answer
168 views

Examine a bunch of huge files

I have a folder with big files (few GB each). I would like to search aPATTERNthrough these files. I can do this with grep or ack: $ grep -n 'PATTERN' /path/to/files/*.log Now, I have a list with all ...
0
votes
1answer
972 views

How to grep a string in multiple files on basis of month

I have a set of multiple log files and i want to search specific strings from those multiple log files between time period say July to October 2015. Please note there are multiple log files for each ...
3
votes
2answers
256 views

How is it that the same find command can give two different results?

This has happened to me twice (EDIT: many times and I can replicate it) now. I'm working on a Raspberry Pi, looking for a file I already know exists and so I type this command: sudo find / -iname '...
1
vote
1answer
57 views

How do I get grep to search for ebuilds with specific strings and produce an output containing only the ebuild's location?

I have been trying to create a Bash script function that can be used to search for and open ebuilds with desired strings in Atom (the text editor). This is my current Bash script function (stored in ~/...
0
votes
0answers
67 views

Cannot find files on internal HDD

My Fedora system is installed on my SSD, and GNOME can easily find files there. However, files on an automounted internal HDD are not found. Is there a way to make GNOME index the HDD? I'm ...
0
votes
1answer
133 views

Egrep expression as a grep expression

I have this egrep command which's expression searchs for filenames with length 3 (excluding .extension): ls | grep -E '^.{3}\.+' However, I'm unable to write this with grep only, is it possible?