Skip to content

Instantly share code, notes, and snippets.

@j6s
Created March 28, 2014 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j6s/9828718 to your computer and use it in GitHub Desktop.
Save j6s/9828718 to your computer and use it in GitHub Desktop.
# install gnu coreutils via homebrew
# this installs the gnu coreutils with g in front of them
# e.g. gecho
brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt
# -----------------------
# add this to your terminal config file ~/.bashrc or ~/.zshrc
# this overrides the normal commands and maps them on the gnu ones
for a in "base64 basename cat chcon chgrp chmod chown chroot cksum comm cp
csplit cut date dd df dir dircolors dirname du echo
env expand expr factor false fmt fold groups
head hostid id install join kill link ln logname
ls md5sum mkdir mkfifo mknod mktemp mv nice nl
nohup nproc numfmt od paste pathchk pinky pr printenv
printf ptx pwd readlink realpath rm rmdir runcon
seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf
sleep sort split stat stty sum sync tac tail
tee test timeout touch tr true truncate tsort tty
uname unexpand uniq unlink uptime users vdir wc who whoami
yes";
do
alias $a="g${a}";
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment