Find the Biggest File

Find the biggest files in the current directory. Sort by from large to small. Display only the top 20. Display in human readable format.

find -type f -exec du -Sh {} + | sort -rh | head -n 20

WP_Query Reverse Sort

Here’s how to reverse sort WP_Query. Order by ID. Reverse sort by ASC intead of DESC.

  $args = array (
    'cat' => 8, 
    'year' => $year, 
    'orderby' => 'ID',
    'order' => 'ASC', 
    'posts_per_page' => -1, 
    'paged' => $paged, 
    's' => $searchterm 
  );
  $category_posts = new WP_Query($args);