This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killall -9 php -u john |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#when mysql command opens the sql console | |
mysql -e 'show databases' | while read dbname; do mysqldump --complete-insert "$dbname" > "$dbname".sql; done | |
#when mysql showes access denied error use -uROOT and -pPASSWORD | |
mysql -uROOT -pPASSWORD -e 'show databases' | while read dbname; do mysqldump -uROOT -pPASSWORD --complete-insert "$dbname" > "$dbname".sql; done | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host="localhost"; | |
$dbname=""; | |
$username=""; | |
$passowrd=""; | |
$location=""; | |
$command="mysqldump -u".$username." -p".$passowrd." ".$dbname." > ".$location.""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql | |
mysql -u root -p[root_password] [database_name] < dumpfilename.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#without confirmation | |
find . -name "error_log" -exec rm -rf {} \; | |
#with confirmation | |
find . -name "error_log" -exec rm -i {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Memory | |
ps -auxf | sort -nr -k 4 | head -10 | |
#CPU | |
ps -auxf | sort -nr -k 3 | head -10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -iR 'c99' /var/www/html/ | |
grep -iR 'r57' /var/www/html/ | |
find /var/www/html/ -name \*.php -type f -print0 | xargs -0 grep c99 | |
grep -RPn "(passthru|shell_exec|system|base64_decode|fopen|fclose|eval)" /var/www/html/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vncserver :2 -geometry 1024x768 -depth 16 -pixelformat rgb565 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For UBUNTU | |
du -a /var | sort -n -r | head -n | |
# CD foldername | |
du -hsx * | sort -rh | head -10 | |
# For CENTOS | |
for i in G M K; do du -ah | grep [0-9]$i | sort -nr -k 1; done | head -n 11 |
NewerOlder