Questions tagged [find-util]

The standard Unix utility named "find" for walking file hierarchies in order to find or process files. When using this tag, please add a tag to identify the platform.

find is a standard Unix utility (CLI) mandated by POSIX for walking file hierarchies based on a variety of criteria in order to find matching files or execute commands on them.

The find implementations found on modern Unix platforms typically implement extensions to the POSIX specification for find.

It is fine to use this tag even for questions involving platform-specific extension to find, as long as you also add a tag identifying the platform.

21 questions
0
votes
1 answer

Listing directory contents like Unix 'find' command

Working on a modified/simpler version of Unix 'find' utility and as I'm printing out the files, my format is off. Running: ./a.out mydir -print The output should be similar to find, the…
George Rey
  • 13
  • 1
0
votes
1 answer

directory-first-search with find

When find iterates directories, they show up in the order the VFS yields them. Can this order be changed to first traverse directories before looking at files placed beside them? The -depth option is not the solution. It only changes $…
XZS
  • 2,374
  • 2
  • 19
  • 38
0
votes
3 answers

find: missing argument to `-exec', even after escaping semicolon

for i in `ls`; do find /path/to/different/project -name $i -type f -exec sed -i "s/var Handlebars/d" {}; done; I have tried seemingly everything, including escaping the ; after the {}, escaping both ;'s, escaping the quotes, tweaking the sed…
papiro
  • 2,158
  • 1
  • 20
  • 29
0
votes
1 answer

Exclude Library folder from being searched with find command in Terminal–OS X Mavericks

I'm trying to make an AppleScript that searches for a specific folder called keyPRO inside the user's home folder. I'm using the following code in my AppleScript to do this: do shell script "find ~/ -name 'keyPRO'" (The "~/" means search inside the…
user4820905
-1
votes
2 answers

Filter folders whose name is a timestamp - pattern matching vs. regex matching using the find utility

I am writing a generic shell script which filters out files based on given regex. My shell script: files=$(find $path -name $regex) In one of the cases (to filter), I want to filter folders inside a directory, the name of the folders are in the…
user2492958
-3
votes
3 answers

Linux - Find command and tar command Failure

I am using a combination of find and copy command in my backup script. it is used on a fairly huge amount of data, first, out of 25 files it needs to find all the files older than 60 mins then copy these files to a temp directory - each of these…
Vasanth Nag K V
  • 4,860
  • 5
  • 24
  • 48
1
2