bash_profile
This is an old revision of the document!
.bash_profile
- .bash_profile
#~/.bash_profile # # # Set our time-zone, otherwise we get UTC and have to think; export TZ="America/New_York" # Set defaults for the history stuff big and per machine. # This is important because HOMEDIR is an nfs mount through # autofs across all machines. # Below doesn't change how the time is stored in the history # file, only what it looks like with the history command. HISTTIMEFORMAT="%F %H:%M " HISTSIZE=11000 HISTDIR=${HOME}/.history mkdir -p ${HISTDIR} # Should exist, but just to be certain. HISTFILE=${HISTDIR}/${HOSTNAME}_history # And a thing to make and save logs, use like; # <some program> | LOG # Output goes to screen and log. LOGFILE=${HISTDIR}/${HOSTNAME}_log LOG () { tee -a ${LOGFILE} } # Below shows ansi colors in log files. alias less='less -r' # If we're on the home machine, syncronize with OneDrive. if [ "${HOSTNAME}" == "PersonalBox" ] ; then onedrive --synchronize # And, if we're on the home machine, run ~/.sshrc if [ -e ~/.sshrc ] then . ~/.sshrc fi fi # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi alias ls='ls --time-style="+%Y-%m-%d %H:%M:%S"' alias ll='ls -l' alias l='ls -altr' alias l.='ls -d .* --color=auto' alias R='cat /etc/*ease | grep PRETTY | cut -d "=" -f 2' alias D='lsblk -i -f -o size,fstype,name,mountpoint,uuid' alias I='ip a | grep -E "inet|inet6"' alias F='df -hlBM --output=source,iavail,avail,target' # And, if you want the weather; alias W='curl wttr.in' cat /etc/*ease | grep PRETTY | cut -d "=" -f 2 # ~/bin is usually a link to a shared bin folder. if [ -d ~/bin ] then PATH="~/bin:${PATH}" fi # ~/.local/bin is per-machine if [ -d ~/.local/bin ] then PATH="~/.local/bin:${PATH}" fi # This line lists out the aliases with capital letters echo 'Aliases available =' $(alias | grep -E '^alias [A-Z]' | cut -c 7- | cut -d "=" -f1) # vim:ts=4:sw=4
bash_profile.1724430118.txt.gz · Last modified: by steve
