Unix provides users with a find command that can be used to locate one or more files.
find / -name filename -type f 2>errorlog.txt
I am looking for a solution where I can pass the parameters on the prompt itself whenever I need to search for some files, as shown in the examples below.
Path_to_Perl Name_of_Perl_script Path_to_search_directory Filename1 Filename2 Filename3 ...
/usr/bin/perl myfind.pl /tmp Thakur brown orange© BrainMass Inc. brainmass.com October 10, 2019, 12:25 am ad1c9bdddf
Attached solution 291743.pl adheres to the given requirement and thus it should be given ...
The solution makes use of Perl's File::Find module that should be installed on your system. Script arguments should be explicit file names (like hello.txt) and not patterns (like *.txt).