On Sun, Feb 03, 2002 at 06:22:54PM -0600, Chi Hue wrote: >> for binary pfiles, you'd remove the file "players" from the libs dir I >> think. >I was just thinking, I havnt bother to do it myself (yet?), but I use ascii >pfiles, and its not that hard (or at least it shouldnt be, again, havnt >done it yet, lazy factor) to change pfiles to a .pfile (instead of >characternamepfile). that way, you could right up a script under linux to go >recursively, and delete the .pfile files, the way it does object purging. >Just a thought. > Don't really see the reason to consolidate all the individual records into one big file, and can see LOTS of drawbacks and few if any benefits from it. Also, unless you pwipe weekly, it's no big deal. Other than that, that's what my little one-liner does. If you wanna check it (and aren't familiar with find) just try cd lib/pfiles && find . -type f -mindepth 2 -exec echo '{}' ';' The for loop just took care of the objs, aliases, and variable files as well while being nice & neat so they could read it better. That one-liner of course could be pretty dangerous and should be a script so it can check the existance of the dirs before cd'ing else the cd .. at the end will send find off happily deleting whatever's 1 dir level up. Here's a script that should do the job: (Mailer code, as you can see the rm(1) command below, of course backup whatever you think's important. If you want to test it first, just change "-exec rm -f" to "-exec echo" and comment out the rm -f below.) #!/bin/sh # Do a completely full ascii pfile pwipe. # Set this to the path to your lib directory. LIB="/usr/local/CircleMUD/lib" # List the directory names you want included in a pwipe. DIRS="pfiles plrobjs plralias plrvars" # Change this to 2 if you keep any files in the top level player directories # (Usually things like scripts or the like.) This requires you to add the names # of files you want deleted in these directories to the SPECIAL var. DEPTH=1 # List of files to delete that won't be covered because of mindepth # Enter these files relative to the lib directory SPECIAL="pfiles/plr_index" for subdir in $DIRS; do cd $LIB if [ -e $subdir ]; then cd $subdir echo "Deleteing files in `pwd`." find . -mindepth $DEPTH -type f -exec rm -f '{}' ';' fi done if [ $DEPTH -gt 1 ]; then for file in $SPECIAL; do if [ -e $LIB/$file ]; then echo "Deleting $LIB/$file." rm -f $LIB/$file fi done fi -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT