Tuesday 15 July 2014

regex - find files with glob pattern -


I need to find files in that folder which corresponds to a string like this:

I have to say:

  /var/cache/pacman/pkg/vim-runtime-7.3.754-1-x86_64.pkg.tar.xz / var / cache / pacman / pkg / Vim-7.3.918 -2-x86_64.pkg.tar.xz ////  
  Find / var / cache / pacman / pkg -name 'vim *'   

and it should be returned only to those who have '' VIM '', I am currently receiving a Vime-Runtime because obviously -name 'vim *'

I use the Globe pattern Necessary to do I

Here's the format of everything:

  Cashier package package Wersien Packaging Architecture Extension / var / cache / Pakamman / PKG / Vime-Runtime 7.3.754 1 X86_64 pkg.tar .xz / var / cache / pacman / pkg / vim 7.3.918 2 x86_64 pkg.tar.xz   

So basically use the 'Find' command to add one The exact package must be searched

If I have been properly understood, then you must vim - . Gz but do not want to search for vim-runtime .gz. If this is correct then please clear the question. The answer will be:

regex finds the wrong track - the name option does not use regex. This file uses the globe pattern, as you specify on the command line. Try

  Find / var / cache / pacman / pkg -name 'vim- [0-9] *. Edit Gz '  

: Vim- [0-9] * is not good because it finds packages that have a number in the package name but What about it?

  / var / cache / pacman / pkg -name 'vim - * - * - *. Pkg.tar.xz '  P> Edit: Sorry, my mistake does not work because  *  match  runtime -7.3.754 . Maybe my idea was better than the regex idea (did not know -regx option). How about this?  
  / var / cache / pacman / pkg -regex '. * / Vim - [^ -] * - [^ -] * - [^ -] *. Find Pkg .tar.xz '   

No comments:

Post a Comment