diff --git a/src/Utils.cpp b/src/Utils.cpp
new file mode 100644
index 0000000..e63861e
--- /dev/null
+++ b/src/Utils.cpp
@@ -0,0 +1,49 @@
+/*
+// Copyright (c) 2017 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+
+#include <Utils.hpp>
+#include <experimental/filesystem>
+#include <fstream>
+#include <regex>
+
+namespace fs = std::experimental::filesystem;
+
+bool find_files(const fs::path &dir_path, const std::string &match_string,
+                std::vector<fs::path> &found_paths, unsigned int symlink_depth)
+{
+    if (!fs::exists(dir_path))
+        return false;
+
+    fs::directory_iterator end_itr;
+    std::regex search(match_string);
+    std::smatch match;
+    for (auto &p : fs::recursive_directory_iterator(dir_path))
+    {
+        std::string path = p.path().string();
+        if (!is_directory(p))
+        {
+            if (std::regex_search(path, match, search))
+                found_paths.emplace_back(p.path());
+        }
+        // since we're using a recursve iterator, these should only be symlink
+        // dirs
+        else if (symlink_depth)
+        {
+            find_files(p.path(), match_string, found_paths, symlink_depth - 1);
+        }
+    }
+    return true;
+}
\ No newline at end of file
