A commandline utility to find files and directories.

learn more… | top users | synonyms

4
votes
2answers
502 views

Why locate is faster than find? [duplicate]

I was looking for a file in my source and tried both locate and find. Surprisingly locate was searching in entire machine and was faster than find, which was searching only in current directory and ...
0
votes
1answer
15 views

find photos shot by a certain type of camera via terminal

I have a huge collections of photos shot with different cameras on my computer. Now, I would like to find all photos which has been shot with a certain camera via the terminal. I think it should be ...
0
votes
2answers
35 views

Find and exec in found folder

I'm trying to find files containing *.nef and move them to a subdirectory name NEF of the folder in which the file is found. I've started testing with the following command, but this always copies to ...
0
votes
2answers
29 views

Terminal - Search entire directory for keyword

I am working on a Ruby on Rails project so I have to manage multiple files. I think I made a syntax mistake somewhere but I'm not sure well. It would be awesome if I could search for a keyword through ...
0
votes
1answer
30 views

Does the mlocate.db generated by my updatedb cron job also applies to 'find'?

Reviewing the find man pages for Linux and for Unix, I came across the fact that the mlocate.db seems to apply to 'find' based searches as well as to 'locate' executions in certain flavors of Ux. So ...
0
votes
3answers
30 views

Filter only path of files (without directories path) from output using pipe |

rpm -qpl dhad-9.0.27891-2.x86_64.rpm allows to display all file paths and directory paths of this package . Example of output : /opt/dhad/tv_bin/wine/lib/wine/winmm.dll.so ...
0
votes
1answer
33 views

How Can I Combine 'SRM' and 'Find'?

I'm using SRM to securely delete files and directories. Most of the data is on FAT and NTFS volumes since I dualboot with Windows (I'm trying to use Ubuntu as much as possible and stay away from ...
0
votes
1answer
19 views

Lot of “file not found” when using sudo find / -type s

In the attempt to understand why I keep getting the following error error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' while using the command sudo find ...
1
vote
2answers
34 views

how can i find all files that contain embedded crc32's

how can I find all files that contain embedded crc32's e.g. Mydocument190_[F285E17D].pdf using the find command to clarify the crc32's are always within brackets [F285E17D] and the file names may ...
0
votes
1answer
20 views

finding some files and sorting the result by size and copy it to folder

well I want to use the cmd "find" to search some files and in the same time I want to sort the result by size sudo find ~ -name $i -exec du -sh {} \; | sort -nr | head -1 I used the cmd "du" for ...
1
vote
1answer
50 views

Get total diskspace usign du for multiple directories

I know about du -sh which gives me total disk space used for given directory. My problem is the directories I am interested are scattered in lot of subdirectories. I have right "find" command that ...
-1
votes
4answers
104 views

how to find a word in text files from a directory [duplicate]

Suppose that I have a directory with name _file and includes two sub directory like _1 and _2 and on each one I have some text files. I want to search a word like foo in one of these text files. How I ...
3
votes
4answers
310 views

Find files with a specific 2-line pattern using awk

I have a few hundreds of files that has this pattern @<TRIPOS>ATOM 2 H18 65.2220 Du 1 RES1 0.0000 @<TRIPOS>BOND 1 3 5 ar @<TRIPOS>SUBSTRUCTURE among them, some of the files ...
0
votes
3answers
30 views

Using find and stat to display filename(s) and statistics

I'm trying to run a command to find all files starting with 'geo' and see when they were edited. I am trying to following but unfortunately am having no luck.. Is there a param for stat to display ...
1
vote
1answer
47 views

Find files in a directory and list them

I'm in a directory containing several sites directories. All these sites have a logs/ directory. I wish to find and list the files under each logs/ directory with the -ls parameter.
1
vote
1answer
67 views

Track file and folder name changes

I'm successfully running a remote backup of a small server over the internet using rsync. However, the process can be lengthy if the following happens. Let's say a large directory has had its name ...
7
votes
5answers
469 views

How can I combine the find command with other commands so I don't have to navigate to the folder?

Sometimes I want to run certain files, but I don't want to navigate all the way to the folder. If I know the file name and find -name file_name.py only returns one result, can I just use that? For ...
-2
votes
1answer
35 views

What xargs does exactly?

I don't understand exactly what xargs does that's why I'm surprised why these 2 return different results: find ~/Downloads -iname *btsync* | ls -al find ~/Downloads -iname *btsync* | xargs ls -al ...
2
votes
3answers
201 views

Get absolute path of files using 'find' command

Is there a way to get absolute path of a file that is being searched? For example: find .. -name "filename" It gives me results like ../filename but I want the full path. What I need is to find ...
0
votes
2answers
113 views

find/tar combination to backup certain files at one level, and all files in one subdirectory

Our server's directory structure is like this /home/site1/public_html /home/site1/logs /home/site1/cgi-bin etc...(it's the standard when using virtualmin) What I want to schedule backups for is ...
1
vote
2answers
58 views

Find word that has more than 50 characters

I am trying to use find in combination with grep to find all the php files in my web server which have a word (any sequence of characters except whitespace) with more than 50 characters. I have this ...
2
votes
3answers
77 views

Find all .htaccess files that contain a particular string?

How would I find all the .htaccess files (recursively from current folder) that contain a particular string ('common.php') in my case? What would be the command to do so?
1
vote
1answer
134 views

Where are the uploaded files from redmine stored? and its not in “/redmine/files”

I am doing a migration from redmine 1.3.2 stable to 2.4.3 for that I need to migrate as well the uploaded files. In every documentation I can find it says that the uploaded files are in the ...
0
votes
1answer
79 views

find -exec not working properly, why?

I am trying to list all the file names (the basename, not the full path) below my home directory using find. I tried to do: find ~/ -type f -exec echo $(basename "{}") ";" However I end up having a ...
0
votes
1answer
182 views

How can I combine find command with gzip

I am trying to compress a specific files: find /media/mount/storage -newermt "2013-08-01 00:00:00" -path '*/*wind.txt' -print0 | xargs -0 gzip -l >> file_system.tar.gz but I am getting the ...
0
votes
1answer
25 views

Can't find Bluetooth file

This may sound dumb, but i have searched everywhere for /etc/bluetooth/audio.conf . I cannot find it. I have tried searching and doing everything of the manner, but I cannot find it. Please help.
0
votes
1answer
22 views

Need Help regarding Finding tools

When I type command find / -name ??.conf the output is a lot of files such as : find : /home/simmer/local/share/gvfs.metadata : Permission Denied Don't get the desired result, And if I use the ...
0
votes
1answer
59 views

Find directory and delete it's content but not itself

How do I find a directory and delete all it's content but not the directory itself? find -type -d -name 'Tmp' -exec rm -rf {} \; But this also deletes 'Tmp' directory. Thanks in advance.
1
vote
2answers
54 views

Find out where the directory is in Linux?

When I executed the command to give the pid of my processes running, it gave me like this - user@machineA:/$ ps -eo pid,command | grep exhibitor | grep java | grep -v grep 1615 java -jar ...
0
votes
4answers
358 views

How to find a file whose size is less than 10 MB?

I need to find a file in my current directory whose size should be less than or equal to 10 MB. ls -lh gives me the file size of each file but not sure how to find the files whose size are less than ...
0
votes
0answers
32 views

Which app scans all disks searching any kind of media files (photos, videos, etc.)?

Is there an app which scans disks looking for all kinds of media files (photos, videos, etc.) the same way Picasa does for pictures? I could write a bash script to perform such thing, but I'm not ...
1
vote
3answers
144 views

Find directories that DON'T contain a file but YES another one

I have quite a large music collection and would like to find the directories in which I still have compressed files (*.rar) unprocessed. Hence looking for a command that lists directories in which i ...
1
vote
2answers
94 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 ...
4
votes
3answers
338 views

Find files with a minimum filename length

I'd like to find all files in a certain folder which have a filename of at least n characters (extension included). Is there any way to achieve this with find?
3
votes
2answers
218 views

find does not work with my variable

I'm trying to find the number of dirs and files in a given dir. I'm running my bash script like this: ARCHIVE=/path/to/archive ./myScript in my script I am doing this: #find the number of ...
0
votes
3answers
656 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 ...
0
votes
1answer
99 views

retrieve data put into non-directory file by using -mv command

I used the command below to move my data to a directory: find . -name '*.mat' -exec mv {} ./ooutputs \; However the directory of ./ooutputs does not exist. A file named ootputs is then created ...
0
votes
1answer
59 views

Please help identify on which partition I have ubuntu installed

I need to reinstall my GRUB since I cannot boot windows 8 anymore (something happened with my installation of Ubuntu). I want to follow this advice - Boot error > no such device: grub rescue in ...
0
votes
3answers
4k views

Cron to send email if file doesn't exist

I have a cron job that executes a shell script like following 00 01 * * * sh /backup/script.sh Now I need to add a functionality in cron so that if this script doesn't exist then it generates an ...
4
votes
7answers
6k views

Filenames with spaces breaking for loop, find command

I have a script which searches all files in multiple subfolders and archives to tar. My script is for FILE in `find . -type f -name '*.*'` do if [[ ! -f archive.tar ]]; then tar -cpf ...
0
votes
2answers
206 views

Command for find in page (Ubuntu 12.04)

I'm keybinding some shortcuts and I just want to know what the "find in active window" command is. <-- windows equivalent is ctrl-f
2
votes
1answer
72 views

How to reliably determine all folders not used in last 7 days?

I'm writing a script for cleanup job. The script needs to cleanup all folders which are not accessed for more than 7 days. Currently I'm using - for sub_folder in * ; do if [ -z $(find $sub_folder ...
1
vote
1answer
543 views

Ubuntu doesn't find installed drivers for Brother MFC-255CW printer

I am brand new to Ubuntu, but I a fairly experienced computer user. Following the instructions provided by the Brother website, I was able to install the drivers (CUPSwrapper and LPR) for the ...
0
votes
1answer
688 views

How to list all files within subdirectories without the path?

I have 1000 directories and 5-15 sub directories within them containing mp3 files. I want to make a list of all the songs without their paths. Is it doable? Or is there a way to obtain the word after ...
0
votes
1answer
274 views

SD Card vanished after placement of .nomedia file

This is not really a Ubuntu problem but since I moved from Windows to Ubuntu I naturally would like to use Ubuntu to solve this problem. I bought a 32gb sandisk micro sd card for my galaxy note 2. ...
0
votes
1answer
45 views

Search and Replace Similar but Different Phrases

How do I search and replace a common, but different, phrase to a single phrase in multiple files from the terminal. For instance, I want to change the following: File1, File2, File3: --Link2-- ...
2
votes
2answers
484 views

How to move unknown files to unknown directories based on folder name?

I am trying to write a script that will search a directory for a folder, and move the folders contents one directory up from their location. this is what i have so far: find ./localFolders -name ...
3
votes
1answer
48 views

What is the significance of $ and {} in `find ${x} *`

I have the following : x=/ find ${x} * Now this is similar to find / * What is the significance of $ and {} in find ${x} *
1
vote
1answer
138 views

bash: File not found

Thats all on the screenshot.Sorry for pt-br.
25
votes
3answers
4k 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 ...