awk ‘!seen[$0]++’ filename > newfilename
yum install sudo -y
As for protecting your site against brute force attacks, the first option is to use SSH keys (and disable password authentication).
Open terminal and follow the lines;
sudo vi /etc/ssh/sshd_config
service sshd restart
SSH Failed Login Attemps
You can see the last failed login attemps
tail -f /var/log/secure
SHOW VARIABLES LIKE "%slow%";
SET GLOBAL log_slow_queries = 'ON';
SHOW VARIABLES LIKE "general_log%";
SET GLOBAL general_log = 'ON';
mysqladmin -u root processlist;
mysqladmin -u root kill ID;
You need to clean log files (e.g /usr/local/apache/domlogs) with the following command.
Don’t use rm command because it may cause writing problem.
If you wanna clean multiple files, you can use the following commnd.
truncate logfile --size 0
If you wanna clean all the log files, you can use the following command. We need to use *.* because the folders cause the error and break the command.
truncate *.* --size 0
You can use optipng for doing this and you should use the following commands because this is a command line image optimization.
1. yum install optipng
2. optipng [options] input.png
exiftool -all= foo.jpg
To find out what version of Linux (distro) you are running, enter the following command at the shell prompt: