Date created: Tuesday, December 17, 2019 9:12:00 AM. Last modified: Monday, January 25, 2021 2:10:35 PM
Mac BASH Profile
$cat .bash_profile
shopt -s histappend
export HISTCONTROL=ignoredups:ignorespace
export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S '
export HISTSIZE=100000
export HISTFILESIZE=100000
# Custom prompt string
PS1='`
if [ $? -eq 0 ];
then echo -n "\[\e[00;30m\]\u\[\e[01;32m\]@\[\e[00;30m\]\h \[\e[01;32m\][\[\e[00;30m\]\D{%F %T}\[\e[01;32m\]] (\[\e[00;30m\]\W\[\e[01;32m\])\$";
else echo -n "\[\e[00;30m\]\u\[\e[01;31m\]@\[\e[00;30m\]\h \[\e[01;31m\][\[\e[00;30m\]\D{%F %T}\[\e[01;31m\]] (\[\e[00;30m\]\W\[\e[01;31m\])\$";
fi`\[\033[0m\]'
# Mac specific commands/aliases
alias cls='printf "\33c\e[3J"'
# gdate comes from "brew install coreutils"
logDir="$HOME/.ssh/logs/`date +'%Y-%m'`/"
mkdir -p $logDir
Previous page: EXT2/3/4 Mount
Next page: Open Directory and Server Admin Backup