unix - posix shell script: recursively remove all files starting with a certain prefix -
i want use shell script remove recursively files starting prefix ._
(matching pattern ._*
) in directory, embarrassing thing barely know shell scripting except basic. kind enough write 1 me? thanks.
$ find <dirname> -type f -name '._*' -delete
<dirname>
-- root directory.-type f
-- regular files, not directories (if that's want).-delete
-- files (delete them) (if omitted, print file names)
Comments
Post a Comment