2018-03-08 03:25:23 +00:00
|
|
|
---
|
2018-03-08 03:28:11 +00:00
|
|
|
title: Tanshu.Com
|
2018-03-08 03:25:23 +00:00
|
|
|
---
|
|
|
|
|
2018-03-08 03:27:43 +00:00
|
|
|
## Data
|
2018-03-08 03:25:23 +00:00
|
|
|
Create a Data directory `mkdir -p ~/Data`
|
|
|
|
|
2018-03-08 03:27:43 +00:00
|
|
|
## Scripts
|
2018-03-08 03:25:23 +00:00
|
|
|
Create a Script directory `mkdir -p ~/Data/scripts` add the script there and link it with
|
|
|
|
```sh
|
|
|
|
cd ~/bin
|
|
|
|
ls -s ~/Data/scripts/script.sh script.sh
|
|
|
|
```
|
|
|
|
|
2018-03-08 03:27:43 +00:00
|
|
|
## Crontab
|
2018-03-08 03:25:23 +00:00
|
|
|
`export VISUAL=nano; crontab -e`
|
|
|
|
|
2018-03-08 03:27:43 +00:00
|
|
|
## .bash_aliases
|
2018-03-08 03:25:23 +00:00
|
|
|
```sh
|
|
|
|
alias psq='psql -U hops'
|
|
|
|
alias ruby=ruby2.4
|
|
|
|
alias gem=gem2.4
|
|
|
|
alias ls='ls -l --color=auto'
|
|
|
|
alias ct='export VISUAL=nano; crontab -e'
|
|
|
|
```
|
|
|
|
|
2018-03-08 03:27:43 +00:00
|
|
|
## .bash_profile
|
2018-03-08 03:25:23 +00:00
|
|
|
```sh
|
|
|
|
# .bash_profile
|
|
|
|
|
|
|
|
# Get the aliases and functions
|
|
|
|
if [ -f ~/.bashrc ]; then
|
|
|
|
. ~/.bashrc
|
|
|
|
fi
|
|
|
|
|
|
|
|
# User specific environment and startup programs
|
|
|
|
|
|
|
|
export PATH=$HOME/bin:$PATH
|
|
|
|
```
|
|
|
|
|
2018-03-08 03:27:43 +00:00
|
|
|
## .bash_rc
|
2018-03-08 03:25:23 +00:00
|
|
|
```sh
|
|
|
|
# .bashrc
|
|
|
|
|
|
|
|
# Source global definitions
|
|
|
|
if [ -f /etc/bashrc ]; then
|
|
|
|
. /etc/bashrc
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Alias definitions.
|
|
|
|
# You may want to put all your additions into a separate file like
|
|
|
|
# ~/.bash_aliases, instead of adding them here directly.
|
|
|
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
|
|
|
|
|
|
|
if [ -f ~/.bash_aliases ]; then
|
|
|
|
. ~/.bash_aliases
|
|
|
|
fi
|
|
|
|
|
|
|
|
# User specific aliases and functions
|
|
|
|
export GEM_HOME=$HOME/gems
|
|
|
|
export RUBYLIB=$GEM_HOME/lib
|
|
|
|
export PATH=$HOME/bin/:$PATH:$GEM_HOME/bin
|
|
|
|
# export PATH=$HOME/bin/:$PATH
|
|
|
|
```
|