Skip to content

Instantly share code, notes, and snippets.

@Tyrael
Created April 21, 2011 09:00
Show Gist options
  • Save Tyrael/934020 to your computer and use it in GitHub Desktop.
Save Tyrael/934020 to your computer and use it in GitHub Desktop.
random bash stuff
ps auxfw|egrep -i "apache|httpd"|egrep -iv "root|grep"|head -1|cut -f1 -d
# how to apply multiple patches, suhosin patches for example:
for patchfile in `find ./php-5.3.4/ -type f -print`;do
filename=${patchfile/php-5.3.4/php-5.3.6};
filename=${filename//\.diff};
patch $filename $patchfile;
done;
# delete every modified file from an svn checkout
svn st|awk '{$1="";print $0}'|xargs -i rm "{}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment