As you might know, you can use any delimiter to use the search/replace feature of sed to avoid extreme escaping of slashes.
~/ sed -r -e 's@http://google.com/@http://example.com/@g' < input.file > output.file
As you might know, you can use any delimiter to use the search/replace feature of sed to avoid extreme escaping of slashes.
~/ sed -r -e 's@http://google.com/@http://example.com/@g' < input.file > output.file
Um ein bestehendes GIT Repo in einen bestehenden Ordner, gefüllt mit Dateien, zu integrieren, kann man wie folgt vorgehen:
/~ cd notemptydir/ notemptydir/~ git init notemptydir/~ git remote add origin PATH/TO/REPO notemptydir/~ git fetch notemptydir/~ git checkout -t origin/master
um schnell (ohne evtl. nfs mount flaschenhälse) dateien von server zu server zu kopieren, kann man scp benutzen.
auf dem ziel server einloggen und:
~ $ scp user@ip_or_domain:path/to/remote/file /path/to/local/dir/
um mit dem squidclient veraltete dateien aus dem cache zu entfernen, geht man wie folgt vor:
user@server:/www$ squidclient -m PURGE http://www.example.com/js/javascript.js
protected function rGlob($pattern = '*', $flags = 0, $path = false)
{
if (!$path)
{
$path = dirname($pattern).DIRECTORY_SEPARATOR;
}
$pattern = basename($pattern);
$paths = glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);
$files = glob($path.$pattern, $flags);
foreach ($paths as $path)
{
$files = array_merge($files, $this->rGlob($pattern, $flags, $path));
}
return $files;
}