Good Morning To All My TECH Ghettos, Today ima show ya’ll a fuckin command to delete all files except a pattern, ya’ll can use it in a script or even commandline ……. Life gets easy as Fuck !!!!!!!! find . -type f ! -name ‘<pattern>’ -delete A Live Example Before After the following Command find . -type f ! -name ‘*.gz’ -delete Advertisements
We all as a Linux administrator must have come across this error sometime in our lives. [user@host dir]$ sudo bash sudo: effective uid is not 0, is sudo installed setuid root? This happens when sudo does not get the right access permissions. The Solution for this error is giving the following permissions as root user chmod u+s /usr/bin/sudo That Must Sort the issue for CentOS Kind of distros.
visudo demouser ALL=(ALL) PASSWD:ALL, !/bin/su root, !/bin/su -, !/bin/sudo su -, !/bin/su – root, !/bin/sudo su root, !/bin/su, !/usr/bin/passwd, !/usr/bin/passwd root, !/bin/vi /etc/sudoers, !/usr/bin/sudo vi /etc/sudoers, !/usr/sbin/visudo, !/usr/sbin/sudo visudo, !/bin/chmod 777 /etc/sudoers, !/bin/chmod ugo+rwx /etc/sudoers :wq!
We use the “mail.xx.com” as an example. Be sure to replace with your own domain. Open your command prompt. Now, connect with telnet using the following command: telnet mail.xx.com 25 Some servers also accept helo in place of ehlo. ehlo xx.com Type mail mail from: email@example.com rcpt to: firstname.lastname@example.org, email@example.com, firstname.lastname@example.org To write the message – type data, followed by your subject and message. To end the message, put a period on a line by itself and press enter: data Subject: My Telnet Test Email Hello, This is an email sent by using the telnet command. Your friend, Me . quit Type quit to exit telnet. HOW TO CHECK OR READ EMAIL WITH TELNET Open your command prompt. At the command prompt, type in telnet xx.com 110 Type user and the email address (email@example.com) of the user for which you wish to view emails: user firstname.lastname@example.org Then type in pass followed by your password: pass yourpasswordgoeshere Type list to bring up a