Raised This Month: $12 Target: $400
 3% 

Save disk space with symlinks?


Post New Thread Reply   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 05-29-2016 , 19:21   Re: Save disk space with symlinks?
Reply With Quote #11

This is my install bat.

Code:
@echo off

REM -=[ DONT INCLUDE '\' on the end of path names!!!! ]=-

SET "AppDir=D:\STEAM_APP_740"
SET "WorkingDir=D:\STEAM_740_27115"
SET "GameDir=D:\STEAM_740_27115\steam"
SET "DataDir=D:\STEAM_740_27115\csgo"
SET "GameDataDir=\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo"

REM -=[ DELETE ALL SYMBOL LINKS ]=-
DEL "%GameDir%" /F /S /Q

REM -=[ BUILD DIRECTORY STRUCTURE ]=-
xcopy "%AppDir%" "%GameDir%" /T /E /Y
xcopy "%DataDir%" "%GameDir%%GameDataDir%" /T /E /Y

REM -=[ CREATE SYMBOL LINKS TO FROM GAME DATA DIR ]=-
pushd %DataDir%
IF EXIST "%DataDir%" (
	SETLOCAL EnableDelayedExpansion
	FOR /r %%i IN (*) DO (
		Set "string=%%i"
		mklink /H "!string:%DataDir%=%GameDir%%GameDataDir%!" "%%i"
	)

)
popd %AppDir%

REM -=[ CREATE SYMBOL LINKS TO FROM APP DIR ]=-
pushd %AppDir%
IF EXIST "%AppDir%" (
	SETLOCAL EnableDelayedExpansion
	FOR /r %%i IN (*) DO (
		Set "string=%%i"
		mklink /H "!string:%AppDir%=%GameDir%!" "%%i"
	)

)
popd %AppDir%
__________________
Neuro Toxin is offline
stoneyschillhouse
Senior Member
Join Date: Nov 2012
Old 05-30-2016 , 14:54   Re: Save disk space with symlinks?
Reply With Quote #12

1st post edited - can be closed ?

but if there someone who want to know my way

All my (linux) Server runs with symlinks (the hole server, but execlude server.cfg autoexec.cfg... [create this files regular])

I handle it with a single commandline

PHP Code:
cp -sR /home/user-directory/master-server/* /home/user-directory/server1 2>/dev/null 
__________________
SRY FOR MY BAD ENGLISH
I'm german
stoneyschillhouse is offline
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 05-30-2016 , 15:16   Re: Save disk space with symlinks?
Reply With Quote #13

Quote:
Originally Posted by stoneyschillhouse View Post
1st post edited - can be closed ?

but if there someone who want to know my way

All my (linux) Server runs with symlinks (the hole server, but execlude server.cfg autoexec.cfg... [create this files regular])

I handle it with a single commandline

PHP Code:
cp -sR /home/user-directory/master-server/* /home/user-directory/server1 2>/dev/null 
Pretty much this. You just have to define a solid "base", as in, plugins/extensions which all servers share.
__________________
Stopped hosting servers as of November 2018, no longer active around here.
pcmaster is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 05-31-2016 , 16:34   Re: Save disk space with symlinks?
Reply With Quote #14

using ln -s is more than enought. (linux)
__________________
iGANGNAM is offline
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 05-31-2016 , 17:01   Re: Save disk space with symlinks?
Reply With Quote #15

Not if you want to place contents in sub directories you have linked together.
__________________
Stopped hosting servers as of November 2018, no longer active around here.
pcmaster is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode