Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   Need help with deleting all the Frontpage directories off of a server (http://www.greenguysboard.com/board/showthread.php?t=8480)

Cleo 2004-06-19 09:02 AM

Need help with deleting all the Frontpage directories off of a server
 
The paysite that I've become involved with was previously done using Frontpage with the server Frontpage extensions installed.

I want to get rid of "_vti_cnf" directories that are all the place.

I use this to get ride of the .DS_Store files that Macs leave on the server.
find "$@" -type f -name .DS_Store -print0 | xargs -0 rm

So I thought this would work, but I'm getting Illegal variable name
find "$@" -type f -name _vti_cnf -print0 | xargs -0 rm

airdick 2004-06-19 11:56 AM

With find the -type f option specifies a plain file, -type d is a directory.

Something like this will work for empty directories:

find . -type d -name _vti_cnf -exec /bin/rmdir {} \;

If the directories aren't empty this will work to recursively delete the directory and everything below it:

find . -type d -name _vti_cnf -exec /bin/rm -r {} \;


Standard disclaimers apply- A simple typo will trash your whole filesystem right out from under you in a hurry. Make a backup and do some safety checks to test whatever method you settle on before actually adding the commands that will delete anything.


All times are GMT -4. The time now is 02:58 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc