64 lines
1.2 KiB
Markdown
64 lines
1.2 KiB
Markdown
---
|
|
title: Tanshu.Com
|
|
---
|
|
|
|
## Data
|
|
Create a Data directory `mkdir -p ~/Data`
|
|
|
|
## Scripts
|
|
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
|
|
```
|
|
|
|
## Crontab
|
|
`export VISUAL=nano; crontab -e`
|
|
|
|
## .bash_aliases
|
|
```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'
|
|
```
|
|
|
|
## .bash_profile
|
|
```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
|
|
```
|
|
|
|
## .bash_rc
|
|
```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
|
|
``` |