summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-08-27 19:29:17 -0700
committerxyz <gky44px1999@gmail.com>2021-08-27 19:29:17 -0700
commite58e83eb0b39f773e49f44c9d38bf48bc6e00aae (patch)
treebf1767ef2de62643f4520d76f5e1bc82eb4229ed /.local
parent1530efcde1936ba00f5d3cce5f32aad68e5deb58 (diff)
use -delete instead of -execdir rm
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/orgext4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/orgext b/.local/bin/orgext
index 53203d4d..2ece9e72 100755
--- a/.local/bin/orgext
+++ b/.local/bin/orgext
@@ -8,8 +8,8 @@
outdir ()
{
- find . -type f -execdir mv -t "$PWD" -- '{}' \+
- find . -mindepth 1 -maxdepth 1 -type d -execdir rm -r -- '{}' \+
+ find . -type f -execdir mv -nt "$PWD" -- '{}' \+
+ find . -mindepth 1 -maxdepth 1 -type d -delete
}
# may further optimize by output file extension names to a variable and use it for both mkdir and mv, current is fast enough for me