A commandline utility to find files and directories.

learn more… | top users | synonyms

10
votes
1answer
17k views

How can I use find command more efficiently?

I wanted to know, what is the best way to use the find command efficiently? I generally use, find [filename] [dir] which gives me a long list of file names none of them any way related to my search. ...
3
votes
2answers
4k views

How can I search for files in Unity?

I'm trying to use the dash instead of gnome-do, but I can't find files. "Find files" only returns "Top Results". In gnome-do, I was able to set some often-used directories to index. For example, I ...
5
votes
3answers
7k views

How can I find the location of an icon of a launcher in use?

I have a launcher on my desktop and want to add another one manually with the same icon. When I go to the preferences of the existing launcher and click the icon, it doesn't take me to the folder ...
5
votes
6answers
563 views

How can I find files quicker than find or locate?

I have been using find command to find files on my 1 tb hard disk. it takes very long. then I used locate which proved to be faster with regular update using updatedb. But the limitation of locate is ...
6
votes
1answer
16k views

Find file or directory in whole directory structure

How can I find a file with a specific name in bash. I want to search through the whole system. I tried with find, but that only work through one level.
1
vote
3answers
118 views

Accessing a folder that I can't “name” in the shell

I have a stubborn folder that someone must have created accidentally and that has persisted all this time. I can see it with: # find /var/www/html -maxdepth 1 -type d which gives me: /var/www/html ...
27
votes
3answers
6k views

Find directories that DON'T contain a file

Yes, I'm sorting out my music. I've got everything arranged beautifully in the following mantra: /Artist/Album/Track - Artist - Title.ext and if one exists, the cover sits in ...
25
votes
7answers
49k views

Find number of files in folder and sub folders?

I want to find the total count of the number of files under a folder and all its sub folders.
26
votes
2answers
5k views

Did I just delete everything with find -exec mv?

I tried to figure this out on my own. Here's the command I used in the terminal: find . -name "*.jpg" -exec mv {} pictures \; I did not create a directory named pictures first. What happened was a ...
7
votes
2answers
6k views

How can I move all files in subdirectories recursively to a single directory?

I am trying to collect all the files under the current directory and all the subdirectories to one directory. I am trying something like the following find -type f -exec mv {} collection/{} \; ...
13
votes
2answers
19k views

How to find location of installed library

Background: I'm trying to build my program but first I need to set up libraries in netbeans. My project is using GLU and therefore I installed libglu-dev. I didn't note location where the libraries ...
5
votes
3answers
9k views

Using locate to find a directory

I use locate all the time to find files that I know the name of, locate is very fast and I love that. For recently created files find is great, normally with recently created files I know where ...
9
votes
4answers
15k views

Find files in linux and exclude specific directories

I have a find looking like this: rm -f crush-all.js find . -type f \( -name "*.js" ! -name "*-min*" ! -name "*console*" \) | while read line do cat "$line" >> crush-all.js echo >> ...
1
vote
2answers
518 views

Creating a directory of recently created files

On a system I have, files are uploaded through a series of various mechanisms into one central "incoming" directory. Once a day those files are processed and they are moved off to where they need to ...
2
votes
1answer
5k views

Search for a string recursively whilst in current directory

I want to search all files recursively from the directory I am in for a particular string. I tried grep -r -i my_string and I tried it in a test folder with two tiny files but it wouldnt find the ...
6
votes
3answers
6k views

using grep with pipe and ampersand to filter errors from find

I am using cygwin to find a file on the cygdrive. However I need to suppress the permission denied messages (otherwise the results get hidden in the error messages). The following command works: ...
5
votes
1answer
209 views

Finding all .cpp files in the users home directory

How we will find more accurately all .cpp files in the users home directory that were modified no more than 5 minutes ago?
2
votes
2answers
527 views

Command “find -name” must be enclosed in quotes or it doesn't work. Why is that?

find . -name *.rb doesn't work on my ubuntu I have to do find . -name "*.rb" to get it to work. Why is that?
1
vote
2answers
150 views

How to use 'grep' with characters like * and _?

I need to find some text in one or more files. This is what I use: grep -irI "hello" ~/ However, if I want to find a string containing characters like * or _ then these seem to be ignored. Let's ...
1
vote
3answers
4k views

Character encoding problem with filenames - find broken filenames

I have the problem described in this Q&A. Probably from quite old linux distros or from windows I have several files with broken filenames. ls displays a "?" instead of the broken character. I ...
1
vote
3answers
398 views

How can I recover data deleted using find -delete?

HI Guys! I am working on Ubuntu 10.04 version. I accidentally deleted my code from find -delete command. Is there any way to recover the data? Many thanks in advance.
0
votes
1answer
34 views

Can a directory's mtime be older than that of file inside?

I have this very silly and very basic question but I thought better to ask before I start pruning my NAS. I want to delete all directories in which all files are older than 30 days. For files I ...
0
votes
3answers
78 views

What is wrong in follwing -exec command

I m getting error in follwing command cd /opt/lampp/htdocs/EspoCRM-2.5.2 && find data -type d -exec chmod 775 {} error: find: missing argument to `-exec'
0
votes
3answers
1k views

how or where will i find C:\Program Files(x86) in Ubuntu 13.04?

How or where will I find C:\Program Files(x86) in Ubuntu 13.04? I cannot find it. I need it as I have installed a game there and I need to uninstall it. I have already tried to post a similar question ...