diff options
author | peter <peter@FreeBSD.org> | 2001-01-23 11:16:50 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-01-23 11:16:50 +0000 |
commit | 7eafba69d54138a0429c71ddd6080ad718f3527c (patch) | |
tree | 9fd9977704c86e786a10c71f41130e4113c603ba /usr.bin/find/option.c | |
parent | 3bdade41c9a9713ee00256d16b86b65b74fc8f7e (diff) | |
download | FreeBSD-src-7eafba69d54138a0429c71ddd6080ad718f3527c.zip FreeBSD-src-7eafba69d54138a0429c71ddd6080ad718f3527c.tar.gz |
Add the -empty flag, from OpenBSD. It returns true if the directory
is empty. There doesn't appear to be another easy way to do this.
mobile# mkdir foo
mobile# mkdir foo/bar
mobile# mkdir bar
mobile# find . -empty
./foo/bar
./bar
Diffstat (limited to 'usr.bin/find/option.c')
-rw-r--r-- | usr.bin/find/option.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index 6ae15d3..3bb6226 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -68,6 +68,7 @@ static OPTION const options[] = { { "-ctime", N_CTIME, c_ctime, O_ARGV }, { "-delete", N_DELETE, c_delete, O_ZERO }, { "-depth", N_DEPTH, c_depth, O_ZERO }, + { "-empty", N_EMPTY, c_empty, O_ZERO }, { "-exec", N_EXEC, c_exec, O_ARGVP }, { "-execdir", N_EXECDIR, c_execdir, O_ARGVP }, { "-flags", N_FLAGS, c_flags, O_ARGV }, |