|
|
|
|
|
|
|
![]() |
#1 |
Are you sure this is the Sci-Fi Convention? It's full of nerds!
|
Need a ss search and delete script
Does anyone know of any server side script that will search for and delete files of a certain type or name? It would make my life a hell of alot easier for a certain task I have in mind. Any help would be greatly appreciated.
__________________
Submissions Wanted! |
![]() |
![]() |
![]() |
#2 |
Eighteen 'til I Die
|
I am sure that either cd34 or Cleo post a link to a script months ago. I can not find it by searching. If so, I am sure they will give you an answer in the AM
|
![]() |
![]() |
![]() |
#3 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
find . -type f -name \*.wmv -print | awk '{ print "rm \"" $1 \"" }' | sh
that will delete them if they include spaces, (, ), and other punctuation characters. you could use xargs, but, if the list is long enough, xargs will say, too many arguments. index4\*.html (would get rid of all files starting with index4 and ending with .html) needs the \ in there.
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
#4 |
Are you sure this is the Sci-Fi Convention? It's full of nerds!
|
Thanks a bunch Chop and cd34.....
Before you answered cd34 I I did find the following: find /path/to/dir -iname "*.txt" -exec rm {} \; which seems to work well as well. Thanks again!
__________________
Submissions Wanted! |
![]() |
![]() |
![]() |
|
|