Hi,
Below is list of files in my directory.
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:58 12345_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 12346_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 12347_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 123478_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 123478_ks_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 07:00 12346_ks_report.csv
Now I would like to display only the filename start with 12347 .this number will be come from out parameter to shell script from database function call.
So I tried below command to find all the files only should match with this number.
echo $l_file_id
12347
find /home/Roots -maxdepth 1 -type f -name "$l_file_id*".csv
It should only match "
12347_kms_report.csv
" ,But it also match below files
123478_kms_report.csv
123478_ks_report.csv
.
Because I'm using * in my find command. Is there any way get only match
12347_kms_report.csv