Home Search Tutorials Forum Downloads Web Links Help & Support
UTPad.com Header
  Jan 09, 2009
Community Navigation
Home Page
Community News
Calendar
Who's Online
Forum
FAQ
Categories
Gamers
Server Admins
Mappers
Skinners
Modders
Site Content
Downloads
Tutorials
Newsroom
Reviews
Site Information
Member Listing
Site Statistics
Website Projects
About Us
Our Policies
Guestbook
Recommend Us

Help Us Improve our Ranking
by clicking on banners below

Vote on the Unreal Tournament Top 200 Top 100 Unreal Tournament sites
Top 100 Unreal Tournament sites\ Top 100 Unreal Tournament sites Unreal Tournament Unreal Tournament
Unreal 1/2 & Unreal Tournament 2003/2004 Mod DB Top 100
Top 100 Unreal Tournament sites\ Top 100 Unreal Tournament sites UT99TopSites.com


TopGameSites 100
   
Online Now

We have
11 guests and
0 members online

You are an anonymous user. You can login here or register for free by clicking here.

UT99 GOTY Game


    Printer Friendly Page Printer Friendly Page
Homepage My Account Download Search Submit News Logout    
 
 
   
 
 Forum FAQForum FAQ  SearchSearch   UsergroupsUsergroups  PreferencesPreferences 
   Watched TopicsWatched Topics  Watched ForumsWatched Forums  Sub-ForumSub-Forum   MaximizeMaximize  

New linux cache cleaner
Post new topic Reply to topic
 
« View previous topic - View next topic »  
Author Message
~V~Offline
Joined: Jan 12, 2006
Posts: 8
Status: Offline
Post Posted: Mar 08, 2006 - 01:36 PM Reply with quote
Post subject: New linux cache cleaner

I had some problems with my old one - any maps with characters like ( or = in the file name would not copy. So I rewrote it from scratch and so far it seems ok.

Code:

#!/bin/bash 
function moveit() {
        echo $(cp $cachename$ext $utdir$1$realname 2>/dev/null ) 1>/dev/null 2>&1
        if [ ! -f $utdir$1$realname ]; then echo $realname" move failed!"; echo "";fi
}

function close() {
        #rm cache.ini *.uxx 2>/dev/null
        if [ -f $utdir"System/De.u" ]; then rm $utdir"System/De.u" ;fi # optional
        if [ -f $utdir"System/de.u" ]; then rm $utdir"System/de.u" ;fi # optional
        exit 0
}

# Need to change these 2 lines:
cachedir=$HOME/.loki/ut/Cache # change to your cache dir
utdir=/mnt/str1/ut/ # change to your UT dir, or where you want to move files to
ext=".uxx"

cd $cachedir
if [ ! -f cache.ini ]; then close
fi
for line in `cat cache.ini | sed '/\[Cache\]/d'`
do
realname=${line:33:${#line}-34}
cachename=${line:0:32}
if echo "$line" | grep .unr; then moveit "Maps/"
elif echo "$line" | grep .utx; then moveit "Textures/"
elif echo "$line" | grep .uax; then moveit "Sounds/"
elif echo "$line" | grep .umx; then moveit "Music/"
elif echo "$line" | grep .u; then moveit "System/"
else close
fi
done
close


Don't forget to chmod +x it.
It is fairly straight forward to convert to UT2004 but if you need help with that, let me know.


Last edited by ~V~ on Mar 17, 2006 - 01:33 AM; edited 3 times in total
Back to top
View user's profile Visit poster's website MSN Messenger  
~V~Offline
Joined: Jan 12, 2006
Posts: 8
Status: Offline
Post Posted: Mar 11, 2006 - 05:59 PM Reply with quote

2k4 version:

Code:

#!/bin/bash
function moveit() {
        echo $(mv $cachename$ext $utdir$1$realname 2>/dev/null) 1>/dev/null 2>&1
        if [ ! -f $utdir$1$realname ]; then echo $realname" move failed!"; echo "";fi
}


function close() {
        rm tempcache tmp cache.ini *.uxx 2>/dev/null
        if [ -f $utdir"System/den_p1p0-Hack.u" ]; then rm $utdir"System/den_p1p0-Hack.u" ;fi
        exit 0
}

# Need to change this line:
utdir=/mnt/str4/ut2004/ # change to your UT dir, or where you want to save files
cachedir=$HOME/.ut2004/Cache
ext=".uxx"

cd $cachedir
if [ ! -f cache.ini ]; then close; fi
for line in `cat cache.ini | sed '/\[Cache\]/d'`
do
realname=${line:35:${#line}-34}
cachename=${line:0:34}
if echo "$line" | grep .ut2; then moveit "Maps/"
elif echo "$line" | grep .utx; then moveit "Textures/"
elif echo "$line" | grep .uax; then moveit "Sounds/"
elif echo "$line" | grep .ogg; then moveit "Music/"
elif echo "$line" | grep .usx; then moveit "StaticMeshes/"
elif echo "$line" | grep .ukx; then moveit "Animations/"
elif echo "$line" | grep .u; then moveit "System/"
else close
fi
done
close

Back to top
View user's profile Visit poster's website MSN Messenger  
{BL}TicklemonsterOffline
Joined: Dec 20, 2005
Posts: 22
Location: Rome, Ga.
Status: Offline
Post Posted: Mar 19, 2006 - 02:51 AM Reply with quote

Great stuff, V. Now if we could get a demo manager and chatlogger for linux, we'd be closer to being like "them" in regards to what you can do in linux. Thanks for posting this, and thanks for all your help for the NIXUT community.
Back to top
View user's profile Visit poster's website MSN Messenger  
Display posts from previous:   
Post new topic Reply to topic
Jump to:  
All times are GMT + 7 Hours
 
Powered by MDForum 2.0.1© 2003-2005 MAXdev Team
Credits
 
Community Login
  Username
  Forgot Password?
  Password
  Not Registered?
Recent Forum Posts
goto PostSwitching drivers fr…(1)
 by kidcobalt
 on 06. Jan 
goto Postgreetings from Digit…(0)
 by skary
 on 05. Jan 
goto PostUT Optical Mouse Pro…(1)
 by Tomcat
 on 29. Dec 
goto PostMISSING FILE(1)
 by Tomcat
 on 28. Dec 
goto Post"Connection Fai…(1)
 by Tomcat
 on 28. Dec 
goto PostMonopoly map(2)
 by Tomcat
 on 28. Dec 
goto PostServer Crashes with …(1)
 by Tomcat
 on 28. Dec 
goto Post{AZ}AirZone is Recru…(0)
 by airman
 on 15. Dec 
goto Posthelp identify this w…(1)
 by shadowkid342
 on 14. Dec 
goto Postany australian clans…(0)
 by cannonfodder
 on 02. Dec 
goto PostNew anti cheat on th…(2)
 by FordTech
 on 15. Nov 
goto Post1v1 Tournament with …(0)
 by Se7eN
 on 13. Nov 
goto Post"Connection Fai…(0)
 by clamneck
 on 10. Nov 
goto PostConnection Failed Ab…(0)
 by clamneck
 on 10. Nov 
goto PostBye bye utpad(5)
 by Se7eN
 on 01. Nov 
goto Post[C]W[L] Servers &…(0)
 by Cardiff
 on 01. Nov 
goto PostLaG - Livid and Gift…(0)
 by Se7eN
 on 30. Oct 
goto PostUnrael 2 the awakeni…(0)
 by McParadox
 on 14. Oct 
goto PostZark Fun Nights(0)
 by FordTech
 on 26. Aug 
goto PostTNP CLAN(0)
 by FordTech
 on 26. Aug 
goto PostWhat tools to i need…(1)
 by Zzzt!
 on 23. Aug 
goto PostVista(0)
 by BeagleBreath
 on 17. Aug 
goto PostUT Patch 436 - Won't…(3)
 by graystripe
 on 16. Aug 
goto PostDownload UT99(7)
 by graystripe
 on 16. Aug 
goto PostHi - Im New!(1)
 by Zzzt!
 on 14. Aug 
goto Postwhatever happened to…(1)
 by Zzzt!
 on 14. Aug 
goto Postserver. 8.9.30.167(0)
 by FTBBUZZKILL
 on 10. Aug 
goto Post*SGR* Cyber's Lair(0)
 by *SGR*Cyber
 on 03. Aug 
goto PostI need more friends.…(0)
 by Houseanxiety
 on 26. July 
goto PostHow to Increase the …(1)
 by Hook
 on 24. July 

[Access Forum]

 
Site Poll
Which UT game do you play the most?

Sorry, the admin has reserved this poll for site users only. Register now! It's free!

[ Results | Polls ]

Votes: 115 | Comments: 2

Newsletter

Subscribe to our
Monthly Newsletter!

Your e-mail:

Format 

[Advanced Registration]
Install Our Toolbar

a Conduit toolbar
Chat & meet other members!
Add to My Yahoo!
Page created in 0.508540 Seconds