From 86c50e043eb847d343888e6582011f84af1576b3 Mon Sep 17 00:00:00 2001 From: Thibault Maekelbergh Date: Mon, 9 May 2022 09:48:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(fs):=20Add=20filecount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/fs/filecount.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 lib/fs/filecount.sh diff --git a/lib/fs/filecount.sh b/lib/fs/filecount.sh new file mode 100755 index 0000000..24c4347 --- /dev/null +++ b/lib/fs/filecount.sh @@ -0,0 +1,8 @@ +#! /usr/bin/env bash + +# ------------------------------------------------------------------------------ +# fs.filecount(): Gets the total amount of files in current dir. +# ------------------------------------------------------------------------------ +function oy::fs.filecount() { + find . -type f | wc -l +}