「よく使うalias」の版間の差分
		
		
		
		ナビゲーションに移動
		検索に移動
		
| 17行目: | 17行目: | ||
==== ls関連 ====  | ==== ls関連 ====  | ||
<syntaxhighlight lang="bash">  | <syntaxhighlight lang="bash">  | ||
alias ll='ls -lhA --color=auto'  | alias ll='ls -lhA --color=auto --full-time'  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
2019年3月23日 (土) 00:34時点における版
aliasを記載する場所
~/.bash_profile
or
RedHat系
/etc/bashrc
or
Debian / Ubuntu系
/etc/bash.bashrc
aliasを即反映
$ source ~/.bash_profile
alias集
ls関連
alias ll='ls -lhA --color=auto --full-time'
grep関連
alias grep='grep --color=auto'
git関連
alias gl='git log --oneline --decorate=full --graph --branches --tags --remotes --date=iso --format="%C(yellow)%H%C(reset) %C(magenta)[%ad]%C(reset) %C(cyan)@%an%C(reset) %C(auto)%d%C(reset) %s"'
cd関連
alias ..='cd ..'
まとめ
黙ってこれをコピペ
alias ll='ls -lhA --color=auto'
alias grep='grep --color=auto'
alias gl='git log --oneline --decorate=full --graph --branches --tags --remotes --date=iso --format="%C(yellow)%H%C(reset) %C(magenta)[%ad]%C(reset) %C(cyan)@%an%C(reset) %C(auto)%d%C(reset) %s"'
alias ..='cd ..'