aboutsummaryrefslogtreecommitdiff
path: root/functions/rchmod.fish
diff options
context:
space:
mode:
authorDeposite Pirate2025-01-12 14:40:33 +0100
committerDeposite Pirate2025-01-12 14:40:33 +0100
commite7764f9b08072cfb67c2d3ecf075df9a80aee6fd (patch)
tree628d5f66e1d62f1d710bcbe472aa68b5e19522f8 /functions/rchmod.fish
parent62d7fa8cfa2e6de053d7c1238bd8fdcdf0cc8a7d (diff)
Import config.
Diffstat (limited to 'functions/rchmod.fish')
-rw-r--r--functions/rchmod.fish11
1 files changed, 11 insertions, 0 deletions
diff --git a/functions/rchmod.fish b/functions/rchmod.fish
new file mode 100644
index 0000000..b54348f
--- /dev/null
+++ b/functions/rchmod.fish
@@ -0,0 +1,11 @@
+function rchmod --description 'Recursively reset premissions of files and folders'
+
+if not command -sq 'find'
+ echo "Can't find find."
+ return 1
+end
+
+find . -type d -exec chmod 755 {} +
+find . -type f -exec chmod 644 {} +
+
+end