Steven Ferrino

Technical SEO / PHP Developer

  • Home
  • SEO
  • Local Search
  • PHP
You are here: Home / Random / File / Directory Sizes in Linux

File / Directory Sizes in Linux

June 17, 2012 by Steven Leave a Comment

Just a few notes for anyone who has the luck of playing server admin. This is not a full list, just things I happened to be playing with when I wrote this. Comment below if you think something should be added.

Mounted Partition Sizes

df -H

Directory Sizes

du -H .

For a specific directory

du -H /home

Sorted by largest to smallest

du -kH | sort -nr | more

Finding Files

By Name

find . -name wp-config.php
find /home/mydirectory/ -name wp-config.php

By Size

find . -size +100M

Finding Words Within Files

grep thisword *

Specific Filetypes

grep thisword *.php

Looking At/Reading Files

more filename
cat filename

Filed Under: Random

Steven Ferrino

Recent Posts

  • Google Core March 2023 Not Just E-A-T
  • [Fix] – Jupiter Theme: /jupiter/dynamic-styles/global/header.php on line 346
  • Laravel 5.4: SQLSTATE[42000]: Password_resets – [Solution]
  • Restrict wp-login.php Access With Htaccess
  • Reading CSV Data and Ignoring NA’s

Blogroll

  • Microdata Generator

Profiles

  • LinkedIn
  • Twitter

Copyright © 2023 · Dynamik-Gen on Genesis Framework · WordPress · Log in