the1ts/todo.txt-plugins

find commands using -size option

Closed this issue · 0 comments

A number of these scripts use find ...... -size 1b to find non empty files

It is better to use either:

replace 1b with 1c (search for files with a size of 1 byte or greater) -size 1c rather than 1b

OR

 drop the 'b' from the -size leaving '-size 1' (search for files with a size of 1 * 512 bytes blocks)

The default for GNU find is in 512 bytes blocks and so the 'b' suffix is redundant. It also is not POSIX compliant and breaks on on Unix, BSD and minix systems.

This simple addition of a 'b' in the find command breaks the notes plugins on