hello.
i need find folders only with name 2006 and delete.
find /path/to/dir/-07/ -type d | grep 2006 | -exec rm -rf {} \;
and etc doesnt work :\
what i do wrong :?
hello.
i need find folders only with name 2006 and delete.
find /path/to/dir/-07/ -type d | grep 2006 | -exec rm -rf {} \;
and etc doesnt work :\
what i do wrong :?
Why you need grep ? Read man find
find /path/to/dir/-07/ -type d -name "2006" -exec rm -rf {} \;
doesnt work:( not deleted.
root@des:/media/2008-04-26/des# ls
Deepslauter-Rock_Em_All-(Reissue)-2007-VERiTAS Enjae-Enjae-2006-SMO
root@des:/media/2008-04-26/des# find /media/2008-04-26/des/ -type d -name "2006" -exec rm -rf {} \;
root@des:/media/2008-04-26/des# ls
Deepslauter-Rock_Em_All-(Reissue)-2007-VERiTAS Enjae-Enjae-2006-SMO
find /path/to/dir/-07/ -type d -name "*2006*" -exec rm -rf {} \;
ohh working! BIG thx all