WordPress database error: [Can't create/write to file '/tmp/#sql_60b_0.MYI' (Errcode: 28)]
SHOW FULL COLUMNS FROM `wp_options`

WordPress database error: [Can't create/write to file '/tmp/#sql_60b_0.MYI' (Errcode: 28)]
SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (142) ORDER BY t.name ASC

Powershell script to delete old files/folders | Data Networking Blog

WordPress database error: [Can't create/write to file '/tmp/#sql_60b_0.MYI' (Errcode: 28)]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (140) ORDER BY t.name ASC

WordPress database error: [Can't create/write to file '/tmp/#sql_60b_0.MYI' (Errcode: 28)]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (219) ORDER BY t.name ASC

Data Networking Blog
Blog for Admins

Powershell script to delete old files/folders

Standard

Powershell script to delete old files/folders

The script below will delete any files/folders older than the provided number of days. It first creates an inverted tree of folder/file structure and then loops through each to see if the last write time is older than a given number of days. You can also clean empty folders by setting the variable delEmptyFolders to 1 otherwise this script will ignore the folders which may be suitable in some cases.

 

 

EDIT: Learned something new today. IF I add the folders like below then it works fine as long as there are more than one subfolders in the directory. But if there is only one then it appends the $directory to the previous folder and fails with errors.

$folders = Get-ChildItem $directory -rec | ? {$_.PSIsContainer -eq $true} | select-object -ExpandProperty FullName | sort-object -Descending
$folders += $directory

 

To fix do it like this so it always creates proper array

$folders = @(Get-ChildItem $directory -rec | ? {$_.PSIsContainer -eq $true} | select-object -ExpandProperty FullName | sort-object -Descending)
$folders += @($directory)

August 20, 2015 Uncategorised Jd

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Font Size
Decrease Size Default Size Increase Size
Select Skin
Select Underlay Background
Select Overlay Background
Scheme Switcher Toggle