bash on Linux, delete files with certain file extension -


i want delete files specific extension - ".fal", in folder , subfolders, except 1 named "*original.fal". problem want delete other files have same extension:

  • *original.fal.ds
  • *original.fal.ds.erg
  • *original.fal.ds.erg.neu

there other ".fal"s want delete well, don't have "original" in them. names vary time, can't delete specific names. *original.fal doesn't vary.

i can here:

$find /disk_2/people/z183464/doe-wellen -name "*.fal" \! -name "*original.fal" -type f -exec echo rm {} \; 

it great if command can delete in folder (and it's subfolders) has been called (executed)

when run code gives me error:

  1. /disk_2/people/z183464/doe-wellen: directory

if not want find dive deep, can restrict -maxdepth.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -