Saturday, 2 February 2013

How To Find All Zero Byte Files (aka Zero Length File) Under Ubuntu / Linux

A zero byte file is a file that is placed in your hard drive with no data inside it. This means it has a size or length of zero bytes. If you want to list all zero byte files in a particular location in your hard drive under Ubuntu or any other Linux-based system, you can simply use the "Find" command line utility.

To scan for example the current terminal location for zero length files, you can use this command:

find -size 0

To scan a particular directory (the home directory for example), use this command:

find ~/ -size 0

To scan your root folder, use this command:

find / -size 0

No comments:

Post a Comment