I need a nice column for Centrify tool which include all the log files under the different folders, for example;
/oradata1/oracle/admin/A/scripts/rman_logs/*.log
/oracle/oracle/admin/B/scripts/rman_logs/*.log
/oradata2/admin/C/scripts/logs/*.log
I used this but after the * character user can see all logs; /ora(data(1|2)|cle)/oracle|admin/admin/*/scripts/rman_logs
/ora(data(1|2)|cle)/oracle|admin/admin/*/scripts/rman_logs
Which expression I must use.
If I understandy our question correctly, you want only
.logfiles. You can use a positive lookahead to assert that it is indeed alogfile (contains.logat the end of filename), and match the filename whatever it is(.*).Then it's really easy.
(?=.*\.log(?:$|\s)).*Of course, you can also add specific folders if you wish to restrict the matches, but the positive lookahead will still do its work. I.e.(?=.*\.log(?:$|\s)).*/scripts/.*EDIT: As your comment, you only need those folders, so you just specify their filepaths in alternations and add
[^.\s\/]*\.logat the end. So:(?:\/oradata1\/oracle\/admin\/A\/scripts\/rman_logs\/|\/oracle\/oracle\/admin\/B\/scripts\/rman_logs\/|\/oradata2\/admin\/C\/scripts\/logs\/)[^\s.\/]*\.logYou may shorten the regex by trying to combine filepath elements, but, imo, not necessary as you might as well specify each filepath individually, if they don't overlap too much.