有意思的 alias

2014-09-10 10:36:02 +08:00
 yueyoum
http://alias.sh/most-popular/usage
4188 次点击
所在节点    分享发现
12 条回复
kukat
2014-09-10 11:18:55 +08:00
Favourite thing in my .bashrc remains:
alias fuck='sudo $(history -p \!\!)'

https://twitter.com/liamosaur/status/506975850596536320
jsonline
2014-09-10 11:53:32 +08:00
好顶赞
typcn
2014-09-10 11:58:41 +08:00
@kukat 应该 alias fuck='sudo rm -rf /'
hahastudio
2014-09-10 12:01:37 +08:00
alias please='sudo'
skybr
2014-09-10 12:11:06 +08:00
排第一的那个解压为什么不直接用aunpack.
openroc
2014-09-10 12:15:14 +08:00
cool!~, up~!
openroc
2014-09-10 12:16:20 +08:00
@hahastudio alias god='sudo' :)
openroc
2014-09-10 12:19:45 +08:00
share my aliases in .bashrc, :)

# some aliases

# different configurations for linux and mac
if [ `uname` == "Darwin" ]; then
alias ls='ls -G'
alias ss2='netstat -l -p tcp'
alias gg='open'
alias gvim='mvim'
alias ctags='/usr/local/bin/ctags'
else
alias ls='ls --color=auto'
alias ss2='ss -tunpl'
alias gvim='gvim -f'
# configure input method
input_method=fcitx
im-switch -s ${input_method}

if [ -n "${input_method}" ]; then
export GTK_IM_MODULE=${input_method}
export QT_IM_MODULE=${input_method}
export XMODIFIERS="@im=${input_method}"
export XIM=${input_method}
export XIM_PROGRAM=${input_method}
fi
# quick open
alias gg='nautilus'

fi

alias goshare='nautilus smb://share/'
alias gotemp='nautilus smb://share/temp'

alias ll='ls -lh'
alias la='ls -A'
alias l='ls -CF'

alias du='du -h'

alias df='df -h'

alias ps2='ps aux | grep'
alias history2='history | grep'
alias kill2='kill -9'
alias ip2='ifconfig | grep inet'


# tmux related
alias tmux="/usr/local/bin/tmux -2"
alias tmuxnew='tmux new -s'
alias attach='tmux attach -t'

# todo
alias ta='todo -a'
alias ta1='todo -p 1 -a'
alias ta2='todo -p 2 -a'
alias ta3='todo -p 3 -a'
alias ta4='todo -p 4 -a'

# rename sublime text
alias tt="sublime_text"

# quick apt related
alias ggupdate='sudo apt-get update'
alias ggupgrade='sudo apt-get upgrade'
alias gginstall='sudo apt-get install'
loryyang
2014-09-10 12:39:29 +08:00
nice啊!有些alias还真是没想到,看到就觉得很有用
WKPlus
2014-09-10 13:42:16 +08:00
有意思,mcd就吸引到我了,以前一直`mkdir xx;cd !$`还以为够简洁了。
楼上的please=sudo也蛮有意思呀
bullettrain1433
2014-09-10 13:58:04 +08:00
@kukat 求教history -p \!\!功能是?
semicircle21
2014-09-10 15:26:14 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/132650

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX