

See also the manual for fallocate on your Linux system. You can call it like fdupes -r /path/to/dup/directory and it will print out a list of dupes. Such files are found by comparing file sizes and MD5 signatures, followed by a byte-by-byte comparison. Creating a sparse file is quick, while filling it with zeros is slow (and unnecessary). From man fdupes: Searches the given path for duplicate files. disk images for virtual machines or swap files etc. Sparse files are common when working with pre-allocated large files, e.g. It is a sparse file (mostly zeros that are not actually written to disk but represented as logical "holes" in the file). This means that this is a 512 MB file that takes about 24 KB on disk. size -1M which will only match files of size zero. Meaning, 69.001 gets rounded up to 70 and thus gets excluded A perfect example is find. rw-r-r- 1 myself wheel 512M Apr 8 11:44 file Do NOT use the abbreviations 60M and 70M as this will also exclude all files of size greater than 69MB including 69.001MB - Test: -size n bckwMG True if the file uses n units of space, rounding up. This will give the same number as du -B 1 for the file. You can use the find command and du command to find out all the large files and directories which are hogging disk space. With GNU ls, you may also do ls -s -block-size=1 on the file. There are other options in the type to find the file.

This is not what you want to use to get number of bytes actually used on disk. Use the following command to find the -type parameter is as follows: find -type typedescriptor query. Note that with GNU coreutil's du (which is probably what you have on Linux), using -b to get bytes implies the -apparent-size option. See also the manual for du on your system. du would give you the size of the file "on disk".īy default, du gives you the size of the file in number of disk blocks, but you may use -h to get a human readable unit instead. Ls -l will give you the apparent size of the file, which is the number of bytes a program would read if it read the file from start to finish.
