• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Using find to locate all zero length files

Using find to locate all zero length files

A little while ago I posted how to use the Linux/Unix/OSX find command to locate files bigger or smaller than a particular size but didn’t cover how to find zero length files. This is shown here.

Find zero length files

It’s very easy, just like so:

find . -size 0

“find” is obviously the command itself.

The . means start searching from the current directory. If you wanted to find files from another directory then replace the . with the directory. For example to search everything under the system log directory then “find /var/log <other parameters>” is what you would do.

Finally the “-size 0” flag specifies just to find zero length files.

Check Out These Related posts:

  1. Remove directory Linux
  2. MySQL utility commands
  3. Using find to locate files modified in the last 24 hours etc
  4. Using find to locate files bigger or smaller than a size

Filed Under: Linux/Unix/BSD, Quick Tips

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap