diff options
author | Dominik Porada <porada@me.com> | 2012-08-02 00:33:33 +0300 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2012-08-01 23:59:02 +0200 |
commit | 4b1381e99d1388de5d5cbcc5db9d83f400de12aa (patch) | |
tree | bcbdcc80d22bc136d23cf3ebd7031340a06af151 /.aliases | |
parent | 7d9a9f2e707d4ee617b3521ac245007bde7f4490 (diff) | |
download | dotfiles-4b1381e99d1388de5d5cbcc5db9d83f400de12aa.tar.gz dotfiles-4b1381e99d1388de5d5cbcc5db9d83f400de12aa.tar.bz2 dotfiles-4b1381e99d1388de5d5cbcc5db9d83f400de12aa.zip |
.aliases: Make `fs` work with both GNU `stat` and OS X `stat`
Diffstat (limited to '.aliases')
-rw-r--r-- | .aliases | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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' |