"With great power comes great responsibility"
atleast thats what Uncle Ben told ole Spidey before he kicked the bucket..
Either way; Commands which must be run VIA SSH require this Great Responsibility!
Permissions Fix Script
curl -s fixyourwordpress.com/permission_fix/perms.txt | bash
WordPress
find /home*/*/public_html/ -type f -iwholename "*/wp-includes/version.php" -exec grep -H "\$wp_version =" {} \;
Joomla
find /home*/*/public_html/ -type f -iwholename "*/wp-includes/version.php" -exec grep -H "\$wp_version =" {} \;
version.php inside includes folder
Drupal
check CHANGELOG.txt in your Drupal root directory...
cat /etc/release
OR
cat /proc/version
Login to your server as root via SSH. Execute the following script from the command line.
Replace [username] with the cPanel user name of the domain & [password] with the new password.
/scripts/chpass [username] [password]
If you are facing this error, please use the following command and reset. warn [realchpass] Insecure passing of password on ARGV. ERROR: /usr/local/cpanel/scripts/realchpass interface.
You can force a password change through this script by setting the environment variable
‘ALLOW_PASSWORD_CHANGE=1′.
export ALLOW_PASSWORD_CHANGE=1
You will then Need to Synchronize the new password with FTP password;
In cPanel/WHM servers, whenever a new account is created in WHM, by default a FTP account is created. The cPanel password and FTP password are synchronized. Use the following command to synchronize the new password with FTP password.
/scripts/ftpupdate
Find the files that are larger than 500MB in the current directory (./)
find ./ -size +500M
Prints our more information about these files
find ./ -size +500M -exec ls -lh {} ;
Or, more conveniently, sort these results by file sizes
(find ./ -size +100M -exec ls -lh {} ;) | sort -rh
How do I undo a recent change in the vim text editor?
Vim / vi text editor remembers all last changes, such as adding or deleting text or block of code. You can quickly revert all changes in vim using undo mode. This page shows how to undo recent changes and editing in Vim / vi text editor running on Linux or Unix-like systems.
How to undo in vim
The commands are as follow to undo text and editing or deleting in vim. The syntax is:
u
OR
:u
OR
:undo
:undo N
:undo 3
To undo all latest changes on one line, run:
U
Press the Esc key to go back to the normal mode
ESC
Type u to undo the last change.
To undo the two last changes, you would type 2u.
Press Ctrl-r to redo changes which were undone. In other words, undo the undos. Typically, known as redo.
How to undo in vim
The commands are as follow to undo text and editing or deleting in vim. The syntax is:
u
OR
:u
OR
:undo
:undo N
:undo 3
To undo all latest changes on one line, run:
U
More on this found here
Not Sponsored by
YET.....