WordPress: Replace or Purge Text on all Posts by mysql

If you have to remove a link, text or else on all wordpress posts pages with same signs like the „read more“ tag do:

 mysql -u dbadmin -p 

– enter password
– change database by:

use databasename

– run change command(SET „more-tag-source-html-pre“ WordPress reformat the output here! ):

mysql > UPDATE wp_posts SET post_content = REPLACE (post_content,'<!!--more-->',''); 

– System Echo’s:

Query OK, 88 rows affected (0.01 sec)
Rows matched: 706 Changed: 88 Warnings: 0

Ubuntu Debian Samsung SSD secure erase with Linux

If you use a Samsung (possible others brands same howto) SSD and you want to secure erase the SSD for reuse or resale (better destroy it!!!) do:

  • Insert your Debian/Ubuntu Setup CD/Stick
  • Boot into Live/Setup Mode
  • open Gnome Terminal or Console and enter $sudo su – #to be root
  • then enter..

$ apt-get update && apt-get install hdparm # get the tool
$ sudo fdisk -l # show drives
$ sudo hdparm -I /dev/sda #show drive Infos and lock for "frozen" state!!! shoud be not frozen/locked
$ sudo hdparm --security-set-pass NULL /dev/sdb # set the "NULL" password to UNLOCK the Controller
$ sudo hdparm --security-erase NULL /dev/sda # run secure erase!

Debian Ubuntu: Delete Packages which are marked as „rc“

Problem: If you up/downgrade a Debian most of unneeded files are always on your disk

Solution:
To check:

$sudo dpkg -l | more

To cleanup:
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

If you like run the command twice cause sometimes deps are new taken
or install deporphan to:
$sudo deborphan | xargs sudo apt-get -y remove --purge

If you like run the command twice cause sometimes deps are new taken