1

how to match all files that start with the string OS_PATCH and ended with .gz

remark - the solution must to fit Linux and Solaris OS

this task could be by find command or maybe with ls with Regular Expressions or any other idea for example awk

for example

OS_PATCH-ver.4.577.gz
OS_PATCH-pilot-install.gz
OS_PATCH.upgrade-patch.gz
OS_PATCH_generig-patch.gz
.
.
.
.
yael
  • 2,433
  • 5
  • 31
  • 43

2 Answers2

1

You do not tell where you want to look, here are possible ways:

find . -name "OS_PATCH*gz"

or

ls OS_PATCH*gz
jlliagre
  • 8,861
  • 18
  • 36
0

Try with:

find . -regex '.*/OS_PATCH.*\.gz$'
find /folder/where/you/look/for/files -regex '.*/OS_PATCH.*\.gz$'
mulaz
  • 10,682
  • 1
  • 31
  • 37