Hot answers tagged

183

Ubuntu 17.10 and later As the type-ahead search was a Ubuntu-specific patch, it got dropped together with Unity in 17.10. However there is a package called nautilus-typeahead in the Arch repository. Someone took it, compiled for Ubuntu and made a PPA. You can install it by these three commands: sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead ...


76

There are almost too many options to list grep -r 'pattern_to_match' directory_to_search Will output the file name and full line matching the pattern.


74

To complete existing answers: ls The default directory list utility ls can be used in combination with the shell's wildcards . To search for all files with pattern abc: ls -d abc* # list all files starting with abc--- ls -d *abc* # list all files containing --abc-- ls -d *abc # list all files ending with --abc Note that the file extension is relevant ...


67

If you don't want to install additional software, you can simply use grep in the terminal. To recursively search through directories, you can use the -r option (see man grep for details). The syntax you are looking for is probably: grep -r "[STRING TO SEARCH FOR]" "[DIRECTORY TO SEARCH]" So, for instance if I want to search for the string "asdf" in all ...


54

Finding Files with bat Anywhere To find all files anywhere inside /path/to/folder whose names contain bat, you can use: find /path/to/folder -name '*bat*' I have quoted the search pattern *bat* because, if the quotes were omitted and files match *bat* in the current directory, the shell will expand *bat* into a list of them and pass that to find. Then find ...


47

You can use find command to search files with pattern find . -type f -name "abc*" The above command will search the file that starts with abc under the current working directory. -name 'abc' will list the files that are exact match. Eg: abc You can also use -iname -regex option with find command to search filename using a pattern


46

Of course. From the directory you are in do: find . -type f -mtime -7 -exec ls -l {} \; Add a redirection to it (aka > results.txt to store them into that file). type f does only files and not directories mtime -7 does 7 days ago up to now (+7 would be 'older than 7 days') and it then feeds it to ls to show a long list You can play with the ls -l ...


46

Gnome decided to remove the navigation feature type-ahead and replace it with search. They fail to see this is a big problem for many users. Up until Ubuntu 17.10 Canonical provided a patched version of Nautilus that retained this feature. This is not the case anymore and type-ahead is gone for good. You are of course welcome to join the Nautilus mailing ...


44

Terminator has a built-in search (ctrl-shift-f is the default keybinding), but it doesn't highlight the found text, which makes it fairly useless. There's a bug open against terminator to fix this, but right now it's still unresolved: https://bugs.launchpad.net/ubuntu/+source/terminator/+bug/271487


41

Recoll is probably the most versatile document search engine you will find on Linux: It supports a plethora of different formats and is very customizable. For installation instructions and other pointers please check out this answer. The official documentation is very useful, too.


36

Actually I think this is a built-in feature. It's a common thing to need to exclude directories from your search. Here's how to configure it: Open the system settings Select "Security & Privacy" Go to the tab named "Files & Applications" You should see a box named "Exclude", use the "+" and "-" buttons to update this. Anything NOT ...


35

&t= Through partnerships with developers and companies, DuckDuckGo has been integrated into many applications. In these partnerships, a portion of DuckDuckGo's advertising revenue is sometimes shared back. To assign advertising revenue and collect anonymous aggregate usage information, developers add a unique "&t=" parameter to searches ...


32

More directly than filtering the warnings you can disable them by adding -s: grep "My term" -sir --exclude-dir="\.svn" --include=*.{cpp,h} ./ There are some compatibility issues with this option. However, this shouldn't be a problem for personal use. -s, --no-messages: Suppress error messages about nonexistent or unreadable files. ...


32

Ubuntu 18.04 and newer Well, this issue has motivated me enough to finally check out Ubuntu's PPA submission process; you can find Nautilus packages with the Arch community patch applied here: https://launchpad.net/~lubomir-brindza/+archive/ubuntu/nautilus-typeahead and install it by running: sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead ...


31

From man find -empty File is empty and is either a regular file or a directory. So to find both empty files and directories it is sufficient to do find ~/lists -empty To indicate the type, you could use the %y output format specifier %y File's type (like in ls -l), U=unknown type (shouldn't happen) e.g. find ~/lists -empty -printf '%...


29

If you search for "nvidia settings". apt-cache search nvidia settings The output is: nvidia-settings - Werkzeug für die Konfiguration des NVIDIA-Grafiktreibers nvidia-settings-updates - Tool of configuring the NVIDIA graphics driver You see 2 packages nvidia-settings and nvidia-settings-updates. To find the related binary to the package nvidia-settings. ...


28

Install the package pdfgrep sudo apt-get install pdfgrep then use the command: find /path -iname '*.pdf' -exec pdfgrep pattern {} +


25

Type Ahead search was removed completely from Nautilus, aka GNOME Files, since Artful. Luckily, there is a patch on GitHub that adds this functionality back to Nautilus 3.26.3, the version installed by default in Ubuntu 18.04. Now if you want to apply the patch and build Nautilus from source, go ahead, but there is a guy that did the job for us and provided ...


24

The best I use is grep command with options -ri (Recursive and case insensitive search): $ grep -r <text_pattern_to_search> directory_or_path_to_search options that might be useful to you: -i - case insensitive -r, --recursive like --directories=recurse -R, --dereference-recursive likewise, but follow all symlinks --include=...


23

Woohoooo! There is a brand new modified version of Nautilus. See https://launchpad.net/~lubomir-brindza/+archive/ubuntu/nautilus-typeahead I've been waiting for a long time before I find this feature again. Hope that Nautilus developers will consider adding it as an option in the app.


22

Edit the file /etc/updatedb.conf Set up PRUNEPATHS with the directories you DO NOT want to search PRUNEPATHS="/tmp /var/spool /media" PRUNEPATHS: A whitespace-separated list of path names of directories which should not be scanned by updatedb. Each path name must be exactly in the form in which the directory would be reported by locate. By default, no ...


22

Just to add to the above answer, in particular you can use a command line tool from xpdf-utils called pdftotext and then search the text document created by this tool with grep. This might look something like this: pdftotext document.pdf - | grep -C5 -n -i "search term" There is more information in the manual. The only drawback to pdftotext is that you ...


22

The pre-installed GNOME Calculator in Ubuntu 18.04 is a snap application which may lack some features provided by the traditional one due to restrictions of snap packages. Remove the snap application by running snap remove gnome-calculator and install the traditional apt one by running sudo apt install gnome-calculator You may need to to restart GNOME ...


21

poppler-utils Note: xpdf-utils is a transitional package for poppler-utils. You can use poppler-utils. poppler-utils is a suite of tools for Portable Document Format (PDF) files. To install it you can use the Ubuntu Software Center, or by clicking below: pdfgrep pdfgrep can search a string or a pattern in PDF files recursively in directory trees, ...


20

This answer was written before you explained that the embarrassing results don't come from a list of recently used local files, but from the References scope. It mainly targets at disabling local files/application history, but also disabling online search results from the Dash. Once you disabled the online results, you won't get those very ugly result ...


18

Try this in ~/.inputrc "\e[5~": history-search-backward "\e[6~": history-search-forward and reopen terminal.


17

You can use the -U option (--database-root PATH) updatedb -l 0 -U /home/user/music -o /home/user/databasefile -o writes to the output file -l 0 makes that you can read it, otherwise it is only accessible for locate Then you can then use it like: locate -d /home/user/databasefile Dylan -d sets the databasepath To use mlocate with more than one root ...


17

Yes, there is an option. First download the following deb packages: the data package: gnome-terminal-data_3.6.1_all.deb the main package: gnome-terminal_i386.deb (for 32-bit OS) or gnome-terminal_amd64.deb(for 64-bit OS) Second, install them using the following commands in your terminal: sudo dpkg -i /path/to/gnome-terminal-data_3.6.1-0ubuntu4.1_all.deb ...


17

The easiest way is to run locate bat This way you can search through the whole computer for files containing "bat" in the file name To refresh the list of files on your PC run updatedb Run this command when you have recently added new files to your account


17

The simplest approach would be to list the contents of the archive and look for files of the relevant extension. For example, with a zip file: $ zip -sf foo.zip | grep -iE '\.png$|\.jpg$' file1.jpg file1.png file2.jpg file2.png The -sf option tells zip to list the files contained in an archive. Then, the grep will look for a .png or .jpg that are ...


Only top voted, non community-wiki answers of a minimum length are eligible