Subject: moreutils: Please add "dirempty" command

From: Erich Schubert <[email-masked]>
Date: Mon, 28 Aug 2006 22:31:35 +0200

Package: moreutils
Version: 0.16
Severity: wishlist

Hi,
Testing a directory to be empty in bash is hackish, see
http://wooledge.org/mywiki/BashFaq#head-6ec77504553115e8518271d0d319e27148634f19

The cleanest way probably is
if [ -z "$(ls -A "$dir")" ]; then
fi

Maybe we should add a small utility which does test this in a sane way.

if dirempty "$dir"; then
fi

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17.7
Locale: LANG=de_DE.UTF-8@euro, LC_CTYPE=de_DE.UTF-8@euro (charmap=UTF-8)

Versions of packages moreutils depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  perl                         5.8.8-6.1   Larry Wall's Practical Extraction 

moreutils recommends no packages.

-- no debconf information

---

From: Md Jafor <[email-masked]>
Date: Sun, 30 Jul 2023 01:05:18 +0600

---

From: Nicolas Schier <[email-masked]>
Date: Sat, 29 Jul 2023 22:25:00 +0200

Tags: wontfix

I consider re-posting of out-dated URLs is spam.  Joey (upstream 
author) made his point already years ago, I think it's time to close 
this bug.