aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.aliases8
1 files changed, 7 insertions, 1 deletions
diff --git a/.aliases b/.aliases
index 5090499..72ed818 100644
--- a/.aliases
+++ b/.aliases
@@ -75,7 +75,13 @@ alias c="tr -d '\n' | pbcopy"
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
# File size
-alias fs="stat -c \"%s bytes\""
+if stat -c '' . > /dev/null 2>&1; then
+ # GNU `stat`
+ alias fs="stat -c \"%s bytes\""
+else
+ # OS X `stat`
+ alias fs="stat -f \"%z bytes\""
+fi
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'