替换tree 命令(忽略node_modules)

.

0

linux命令: alias tree='pwd;find . -path ./node_modules -prune -o -print | sort | sed '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| /g'\''' /g'\''' '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| sed | sort | -print -o -prune ./node_modules -path . tree='pwd;find alias alias tree='pwd;find . -path ./node_modules -prune -o -print | sort | sed '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| /g'\'''rootopen.com
linux命令: alias tree='pwd;find . -path ./node_modules -prune -o -print | sort | sed '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| /g'\''' /g'\''' '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| sed | sort | -print -o -prune ./node_modules -path . tree='pwd;find alias alias tree='pwd;find . -path ./node_modules -prune -o -print | sort | sed '\''1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/| /g'\'''rootopen.com
vojg 2019-02-25 22:37:07
输出
linux命令:alias 详解

评论

相关推荐

在具有混合图形和使用免费X驱动程序的笔记本电脑上,DRI_PRIME变量指示要运行的GPU。 此别名允许使用更快的独立GPU而无需安装专有驱动程序。

linux命令:alias game='DRI_PRIME=1' game='DRI_PRIME=1' alias alias game='DRI_PRIME=1'rootopen.com
linux命令:alias game='DRI_PRIME=1' game='DRI_PRIME=1' alias alias game='DRI_PRIME=1'rootopen.com
.

打开vim后我们可以使用此命令来编辑剪贴板内容。 对于已经将“xclip -i -selection clipboard -o”别名为pbpaste的人来说,它更简单, 只需:alias vcb ='pbpaste | vim - '

linux命令:alias vcb='xclip -i -selection clipboard -o | vim -' -' vim | -o clipboard -selection -i vcb='xclip alias alias vcb='xclip -i -selection clipboard -o | vim -'rootopen.com
linux命令:alias vcb='xclip -i -selection clipboard -o | vim -' -' vim | -o clipboard -selection -i vcb='xclip alias alias vcb='xclip -i -selection clipboard -o | vim -'rootopen.com
.

linux命令:alias ls='ls -lhGpt --color=always' --color=always' -lhGpt ls='ls alias alias ls='ls -lhGpt --color=always'rootopen.com
linux命令:alias ls='ls -lhGpt --color=always' --color=always' -lhGpt ls='ls alias alias ls='ls -lhGpt --color=always'rootopen.com
.

我将此代码添加到我的.bashrc文件中

linux命令:alias mkdirr='function _mkdirr(){ mkdir $1 && cd $_;};_mkdirr' $_;};_mkdirr' cd && $1 mkdir _mkdirr(){ mkdirr='function alias alias mkdirr='function _mkdirr(){ mkdir $1 && cd $_;};_mkdirr'rootopen.com
linux命令:alias mkdirr='function _mkdirr(){ mkdir $1 && cd $_;};_mkdirr' $_;};_mkdirr' cd && $1 mkdir _mkdirr(){ mkdirr='function alias alias mkdirr='function _mkdirr(){ mkdir $1 && cd $_;};_mkdirr'rootopen.com
.

lias是一个有用的shell内置命令,用于在系统上创建Linux命令的别名(快捷方式) 这个命令将创建一个别名为home等于/home/tecmint/public_html的目录,所以只要您输入在终端输入home,就会你的/home/tecmint/public_html目录

linux命令:alias home='cd /home/tecmint/public_html' /home/tecmint/public_html' home='cd alias alias home='cd /home/tecmint/public_html'rootopen.com
linux命令:alias home='cd /home/tecmint/public_html' /home/tecmint/public_html' home='cd alias alias home='cd /home/tecmint/public_html'rootopen.com
.

linux命令:alias alias alias rootopen.com
linux命令:alias alias alias rootopen.com
.

这将创建一个名为list的别名,它将使用 ls命令打印当前目录中所有文件的长样式列表(-l提供长样式列表,-a显示所有文件 - 包括隐藏文件)

linux命令:alias list ='ls -la' -la' ='ls list alias alias list ='ls -la'rootopen.com
linux命令:alias list ='ls -la' -la' ='ls list alias alias list ='ls -la'rootopen.com
.

该别名,如果你想创建一个“快捷方式”的命令命令可以是有用的。 格式为别名name ='command' 这将创建一个名为home的别名,只要您在命令提示符下键入home,就会将您置于/ home / dave / public_html目录中。您可以为任何所需的命令添加别名,并包含该命令的选项。

linux命令:alias home='cd /home/dave/public_html' /home/dave/public_html' home='cd alias alias home='cd /home/dave/public_html' rootopen.com
linux命令:alias home='cd /home/dave/public_html' /home/dave/public_html' home='cd alias alias home='cd /home/dave/public_html' rootopen.com
.

我自己没有提出这个,但我总是将它添加到我的.bash_aliases文件中。它与运行“sudo !!”的想法基本相同。除了它更容易打字。(你不能只是别名“sudo !!”,它实际上并不是因为我不理解的原因。)“fc”是一个内置的shell,用于编辑和重新运行以前的命令。-l标志告诉它显示行而不是编辑它,-n命令告诉它省略行号。-1告诉它打印上一行。有关详细信息: help fc

linux命令:alias please='sudo $(fc -ln -1)' -1)' -ln $(fc please='sudo alias alias please='sudo $(fc -ln -1)'rootopen.com
linux命令:alias please='sudo $(fc -ln -1)' -1)' -ln $(fc please='sudo alias alias please='sudo $(fc -ln -1)'rootopen.com
.

linux命令:alias scd='dirs -v; echo -n "select number: "; read newdir; cd -"$newdir"' -"$newdir"' cd newdir; read "; number: "select -n echo -v; scd='dirs alias alias scd='dirs -v; echo -n "select number: "; read newdir; cd -"$newdir"'rootopen.com
linux命令:alias scd='dirs -v; echo -n "select number: "; read newdir; cd -"$newdir"' -"$newdir"' cd newdir; read "; number: "select -n echo -v; scd='dirs alias alias scd='dirs -v; echo -n "select number: "; read newdir; cd -"$newdir"'rootopen.com
.

创建一个命令别名(在上面的例子中为'cr'),它在当前目录内递归地搜索与一组文件扩展名匹配的文件内容(上例中的C&C ++源代码)。搜索配置为彩色,忽略大小写,显示行号并显示4行上下文。把你选择的shell初始化文件。非常容易使用,例如:cr sha1_init

linux命令:alias cr='find . 2>/dev/null -regex '\''.*\.\(c\|cpp\|pc\|h\|hpp\|cc\)$'\'' | xargs grep --color=always -ni -C2' -C2' -ni --color=always grep xargs | '\''.*\.\(c\|cpp\|pc\|h\|hpp\|cc\)$'\'' -regex 2>/dev/null . cr='find alias alias cr='find . 2>/dev/null -regex '\''.*\.\(c\|cpp\|pc\|h\|hpp\|cc\)$'\'' | xargs grep --color=always -ni -C2'rootopen.com
linux命令:alias cr='find . 2>/dev/null -regex '\''.*\.\(c\|cpp\|pc\|h\|hpp\|cc\)$'\'' | xargs grep --color=always -ni -C2' -C2' -ni --color=always grep xargs | '\''.*\.\(c\|cpp\|pc\|h\|hpp\|cc\)$'\'' -regex 2>/dev/null . cr='find alias alias cr='find . 2>/dev/null -regex '\''.*\.\(c\|cpp\|pc\|h\|hpp\|cc\)$'\'' | xargs grep --color=always -ni -C2'rootopen.com
.

linux命令:alias counts=sort | uniq -c | sort -nr -nr sort | -c uniq | counts=sort alias alias counts=sort | uniq -c | sort -nrrootopen.com
linux命令:alias counts=sort | uniq -c | sort -nr -nr sort | -c uniq | counts=sort alias alias counts=sort | uniq -c | sort -nrrootopen.com
.

linux命令:alias beep='echo -en "\007"' "\007"' -en beep='echo alias alias beep='echo -en "\007"'rootopen.com
linux命令:alias beep='echo -en "\007"' "\007"' -en beep='echo alias alias beep='echo -en "\007"'rootopen.com
.

linux命令:alias cdc='cd `pwd -P`' -P`' `pwd cdc='cd alias alias cdc='cd `pwd -P`'rootopen.com
linux命令:alias cdc='cd `pwd -P`' -P`' `pwd cdc='cd alias alias cdc='cd `pwd -P`'rootopen.com
.

仅从文件名中排除.svn。

linux命令:alias rgrep="find . \( ! -name .svn -o -prune \) -type f -print0 | xargs -0 grep" grep" -0 xargs | -print0 f -type \) -prune -o .svn -name ! \( . rgrep="find alias alias rgrep="find . \( ! -name .svn -o -prune \) -type f -print0 | xargs -0 grep"rootopen.com
linux命令:alias rgrep="find . \( ! -name .svn -o -prune \) -type f -print0 | xargs -0 grep" grep" -0 xargs | -print0 f -type \) -prune -o .svn -name ! \( . rgrep="find alias alias rgrep="find . \( ! -name .svn -o -prune \) -type f -print0 | xargs -0 grep"rootopen.com
.

linux命令:alias ::='cd ../../' ../../' ::='cd alias alias ::='cd ../../'rootopen.com
linux命令:alias ::='cd ../../' ../../' ::='cd alias alias ::='cd ../../'rootopen.com
.

linux命令:alias pfind='ps aux | grep ' ' grep | aux pfind='ps alias alias pfind='ps aux | grep 'rootopen.com
linux命令:alias pfind='ps aux | grep ' ' grep | aux pfind='ps alias alias pfind='ps aux | grep 'rootopen.com
.

它也找到一个SNMP OID :-(

linux命令:alias ip4grep "grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}'" '([0-9]{1,3}\.){3}[0-9]{1,3}'" -E "grep ip4grep alias alias ip4grep "grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}'"rootopen.com
linux命令:alias ip4grep "grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}'" '([0-9]{1,3}\.){3}[0-9]{1,3}'" -E "grep ip4grep alias alias ip4grep "grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}'"rootopen.com
.

'bash' function ip4rev() { echo $@ | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'; }

linux命令:alias ip4rev "echo \!* | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'" 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'" sed | \!* "echo ip4rev alias alias ip4rev "echo \!* | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'"rootopen.com
linux命令:alias ip4rev "echo \!* | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'" 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'" sed | \!* "echo ip4rev alias alias ip4rev "echo \!* | sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\4.\3.\2.\1/'"rootopen.com
.

linux命令:alias 'ps?'='ps ax | grep ' ' grep | ax 'ps?'='ps alias alias 'ps?'='ps ax | grep 'rootopen.com
linux命令:alias 'ps?'='ps ax | grep ' ' grep | ax 'ps?'='ps alias alias 'ps?'='ps ax | grep 'rootopen.com
.
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

推荐
    热门命令