dotfiles/source/50_file.sh

26 lines
531 B
Bash

#!/usr/bin/env bash
# Files will be created with these permissions:
# files 644 -rw-r--r-- (666 minus 022)
# dirs 755 drwxr-xr-x (777 minus 022)
umask 022
if [ "$(uname)" = "Linux" ]; then
alias ls='ls -p --color=auto'
alias ll='ls -l'
alias grep='grep --color=auto'
fi
# Easier navigation: .., ..., -
alias ..='cd ..'
alias ...='cd ../..'
alias -- -='cd -'
# File size
alias fs="stat -f '%z bytes'"
alias df="df -h"
# Recursively delete `.DS_Store` files
alias dsstore="find . -name '*.DS_Store' -type f -ls -delete"