The find command in Windows systems is used to filter lines of input text, and return those matching the filter. The find command in *nix system is used to locate files or folders that match a certain criteria.

learn more… | top users | synonyms

0
votes
1answer
9 views

Find Executables that link an SO file

I know that I can print out the so files that an exe has linked with ldd. What I want is to go the other way. My current approach is to run something like find / -type f -executable -exec ldd {} \; | ...
1
vote
2answers
21 views

how to use tar '--remove-files' option inside find -exec?

I've got a number of very large log files which I want to compress individually so I can't use xargs or pipe stdout to get a huge compressed file. I'm trying to do this: find . -mtime +1 -iname ...
1
vote
0answers
13 views

Find files which are of size of x Bits

I want to find files which have a size of exactly x bits. However, I only know how to find files with size of x Bytes (using the find comment on *nix). How can I specify a size on bit-level?
0
votes
2answers
22 views

Move most recently modified file

I am trying to move the most recently modified file in "Pictures/". This is what I've tried: find Pictures/ -maxdepth 1 -type f -mmin -60 -print0|tail -1| xargs -0 -I {} mv "{}" Dropbox/somefolder/ ...
3
votes
3answers
269 views

find command locking the system out

I had a folder , with 4+ million files in it. I managed to delete all files , in course of a week , using "find . -delete" and "kill -9" after a minute as it locks the system otherwise. now the ...
0
votes
1answer
24 views

Preserving newline in find/grep search results

I am recursively searching for the occurrence of php scripts being called from other files using the following script. find . -exec grep -Hn $1 {} \; | grep -v ^Binary; Works great! Now, I need ...
1
vote
0answers
31 views

How to find and replace text in embedded excel spreadsheets in word? [closed]

I need to change the values of a series of tables (about 10) embedded in my word doc.
1
vote
1answer
50 views

How to find all executable files in a windows directory?

I'm not sure of the commands or syntax needed to complete this but I thought it would be easy considering what I need it to do. Essentially I want to search C:\users\ for .exe files and output the ...
0
votes
0answers
15 views

How can I get “find” output so that I can copy and paste it to other commands?

Is it possible to print find output paths in such a way that you can copy and paste them, they will already be properly escaped so that you can execute commands on that path? Usually I have to put ...
0
votes
2answers
27 views

How to make a copy of file in the same directory

This creates a file in the same directy as 'some.file.bak'. find /home/ -ipath "*/temp/some.file" -type f -exec cp {} {}.bak \; How to make a copy in another name such as 'another.file' in the ...
0
votes
1answer
35 views

How to copy a list files to a list of directories or subdirectories

I'm trying to figure out how to copy a list of files to a list of subdirectories. eg. I have 300 files to copy into 300 subdirectories - 1 to 1. file1 -> dir1/sub file2 -> dir2/sub file3 ...
0
votes
1answer
10 views

Iterate over files, ignoring filenames with a hyphen

Background Converting images from RGB to grayscale. A number of files exist in different directories. For example: outline/trigon.png outline/oval-bw.png outline/crescent-bw.png ...
0
votes
0answers
18 views

List of subdirectories that contains a particular file name

I am wondering if i can do this in a single shell command. I am in home directory and want to find a list of subdirectories that contains a particular file. The file name and the depth is always ...
0
votes
3answers
38 views

How to list file names on Windows as the Unix find command?

I'm looking for an equivalent command line on Windows to the following Unix command: find test -name '*.txt' -print This command lists every filename which is in the 'test' folder and subfolders, ...
1
vote
1answer
23 views

Is it possible to move last modified files using ls, tail and mv?

I want to move the last 3 modified files from a directory using bash commands. However, I noticed that I can use find in the following way: find . -type f -mtime -0.5 -print -exec mv {} ...
1
vote
1answer
23 views

How to delete broken symbolic links

I have a case where a lot of symbolic links remain after the original file was deleted. It was the result after leaving a Jenkins installation saving all build logs until the number of available ...
0
votes
2answers
18 views

Passing multiple files with whitespace to python script

I have to convert a lot of .ai files to .svg, and I've found ai2svg tool. I've tried for i in `find ./ -type f -name \*.ai`; do python ai2svg.py "$i"; done But I get errors like IOError: [Errno ...
0
votes
2answers
27 views

linux: how to show permission of files (like ls -l) does on files returned by the find command

I am doing a find command to show me the files of a specific extension, like: find $directory -type f -name "*.vm" however I would like to be able to see the file permissions as well (like ls -l ...
1
vote
1answer
36 views

Why the blackslash dot (\.) in the prefix of the path?

I was running the find command looking for some config files and this is exactly what it outputted: ./log4j.xml ./log4j2-test.xml ./proxyserver/src/main/resources/log4j.xml ...
0
votes
1answer
59 views

searching large number of possible file names in large directory tree

I need to search a large directory tree for a large number of possible file names, i.e. I have an input file with a long list of strings that I need to find in the tree (or as below: print all those ...
0
votes
0answers
22 views

Finding all files modified more than 60 minutes ago [duplicate]

I am struggling a little with find . I need all the files that where modified more than 60 minutes ago. As far is understood from all the sources find . -mmin +60 should give me the desired result. ...
1
vote
4answers
81 views

How to get first line of output from command line?

I'm running a find command that's returning multiple results, but I only need the first result. A bit of googling led me to the "read" command, but I couldn't figure it out, and the man page didn't ...
1
vote
2answers
78 views

What does \; mean in a script?

What does \; mean in the following command? I’m also not sure what {} means. Is \; really necessary? find ./ -name file_1 -exec cp {} ./ \;
0
votes
1answer
53 views

how to find all files under directory different directories

How can you find files name 'xyz' under directories name 'abc'? something like this....but its not working. find . -type d -name 'abc' -exec find {} -type f -name 'xyz' \; find . -not -path 'abc' ...
2
votes
1answer
25 views

Find not expanding variable

I tried the following and it didn't work one bit. image=.jpg,.png,.gif find . -type f -iname "*$image" Why? Does find not expand variables?
0
votes
1answer
26 views

OS X: Copying only files without a special string in filename

I have to copy only files from a folder that don't have following string in its filename: NNNNxNNNN (a 3 or 4 digit number followed by the character x followed by a 3 or 4 digit number again -> it's ...
0
votes
1answer
36 views

How to get the time information of the files after find | grep keyword command?

Now I know how to use find | grep keyword to get the file I want. But after that, how should I know the size, create_time info of each file I found? For example, after find | grep tutorial, I got ...
0
votes
2answers
22 views

How to execute files which are found by find

I have some executable files under a directory tree. I want to find them and execute them the most simple way. I've tried this so far: find . -perm 0775 -type f | xargs exec But exec is not an ...
0
votes
2answers
63 views

Windows DOS Command for Finding folder name with specific characters & select it

Trying to write batch file code for copying contents of a folder with path "C:\ABC" to another folder whose exact name is unknown ( its a Profile data folder of firefox) Profiles of Firefox are ...
1
vote
2answers
280 views

Permission denied when attempting to mv (sudo su userName)

I am currently working on a backup script to log into my production server and pull the latest SQL dumps to my staging server. I have no issue pulling the SQL dumps but I do have an issue with moving ...
2
votes
3answers
120 views

In windows, is there a way to count the amount of times a string appears in a file

I am currently trying to write a batch script and at this point, I need to find a string, "null", and determine how many times it is shown in the file. I'm downloading an API from a website ...
1
vote
1answer
127 views

Use 'find' command to search for PNG files, pipe output to imagemagick for batch conversion

I've got a directory with thousands of image files, mostly JPG but some PNG. The files have no extension, they're just numbered. I need to convert all of them to JPG. Using find I can get a list of ...
0
votes
1answer
121 views

Using batch to verify a process is running with WMIC

I am attempting to write a script that will check if a process is running (in my case a virtual machine) @echo off wmic process where name="VirtualBox.exe" | find "GitHubEnterprise" /c > tmpcount ...
0
votes
1answer
62 views

How to capture diff output from find command exec?

I am using Ubuntu (Precise 12.04) I am trying to write some bash script to see if file is changed via awk replace by using diff command. I did a test with the following: #! /bin/bash diff fileA.htm ...
1
vote
4answers
83 views

Linux remove files without giving error

I have this running as cron job /usr/bin/find /backups/* -mtime +5 -exec rm -rf {} \; But it gives me this error on email /usr/bin/find: `/backups/Jun-20-2014': No such file or directory Is ...
0
votes
0answers
11 views

Detect symlink errors in installation

It is my understanding that the Linux Filesystem Hierarchy is supposed to be structured like this: /usr/lib/prog-ver - contains the actual installation of prog (e.g., java) version ver (e.g., ...
1
vote
1answer
56 views

Script bash delete older files on directories with special chracters

I use a script for delete older files on Trash or directories type Junk, or similar. It works fine except when it has special characters or spaces in the names ...
0
votes
2answers
40 views

find: show directories which contain certain subdirectories

I have a list of directories /u2/tip/coy/inter/fcs/ /u2/tip/coy/inter/fcs/devel /u2/tip/coy/inter/fcs/ecom_flink /u2/tip/coy/inter/fcs/totalstable /u2/tip/coy/inter/fcs/develbi ...
1
vote
2answers
112 views

How do you search for a phrase on a page in Chrome? (Not a string match)

I'm using Chrome on a Mac, and want to be able to easily search for a phrase on a page, not an exact string match. For instance, on this page: ...
0
votes
1answer
82 views

Direct errors in find to /dev/null by default

On my OSX command line, find directs errors to STDOUT. I find this very inconvenient, and I also find it annoying to add 2>/dev/null to the end of the command every time. This brings up several ...
0
votes
2answers
58 views

How to List Files greater than particular timestamp?

I have a directory in linux which has a list of log files where log files get auto generated if some job runs. Each log file gets appended with the timestamp like "JobName_TimeStamp" UPDATED: ...
0
votes
2answers
74 views

Why doesn't xargs on find work with a series of commands using pushd and popd to walk a directory subtree?

On a Linux Centos 4 machine, I am trying to create a simple bash command line to walk a directory structure below an arbitrary current directory and in each subdirectory touch a file, list the ...
0
votes
1answer
53 views

How to use find to fill in variable in Shell script

I am making simple Shell script form some boring-ever-repeating job. Script changes directory correctly, and now I want to run other scripts based on argument I typed when running script. Other ...
0
votes
2answers
45 views

Is there a way to show “File not found” or a message alike when using the `find` command?

I'm trying to check the existence of several files, without knowing in advance where the files are located. So, I thought of find as the de facto utility to do this... It works as expected, but the ...
1
vote
1answer
28 views

How can I restrict a bash find to only specific sub-sub-directories

I'm trying to list all the files in a specific sub-directory but different directories which are themselves on a different volume. The following works, but only on a fully specific sub-directory (and ...
2
votes
1answer
61 views

find -regex not recognizing \d digit

I have a directory structure that looks like the following: processor0/10 processor0/10.1 processor0/10.2 processor1/10 processor1/10.1 processor1/10.2 ...etc... processor7/10 processor7/10.1 ...
8
votes
2answers
772 views

Why backslash before asterisk in `find`?

In this command: find . -name \*.pyc -delete Why is a backslash needed before *.pyc ?
0
votes
2answers
19 views

Adding logic to 'find' directories containing either [criteria A] or [criteria B]

I have inherited a vast media archive without a unifying organizational scheme. Its contents date back at least 10 years. I have been asked to find a needle in this hay stack, and I have some guesses ...
0
votes
0answers
10 views

remove permission spam for find is not working tcsh enviroment

Hello this question is asked a lot like here: However, my environment on (csh or tcsh) seems to add a space but I can't figure out why. for instance, on bash: find /. -user `whoami` 2>/dev/null ...
0
votes
1answer
29 views

linux find file modiffied past exact hour

I would like to find files that are modiffied past exact hour. example: File Time Modified test1.log 14.45PM test2.log 15.01PM ...