相关疑难解决方法(0)

是否可以检查别名的定义位置?

别名,例如llalias命令定义的。

我可以检查命令,比如type ll哪些打印

ll is aliased to `ls -l --color=auto'
Run Code Online (Sandbox Code Playgroud)

command -v ll打印

alias ll='ls -l --color=auto'
Run Code Online (Sandbox Code Playgroud)

或者alias ll也打印

alias ll='ls -l --color=auto'
Run Code Online (Sandbox Code Playgroud)

但我似乎无法找到那里的别名定义,即一个文件,如.bashrc在运行中的shell,或者手动。在这一点上,我不确定这是否可能。

我应该简单地浏览所有加载的文件bash并检查每个文件吗?

bash terminal bashrc

58
推荐指数
3
解决办法
3万
查看次数

自定义命令的位置是什么

在哪里可以找到自定义命令的描述/详细信息。在我的 linux 服务器中有一个名为qsubm我需要检查的自定义命令,但我不知道它写在哪里。

command

3
推荐指数
2
解决办法
3105
查看次数

如何知道 shell 变量和函数的设置位置?

当我在系统中输入set命令时,我得到了以下摘录:

__colormgr_commandlist='
    create-device
    create-profile
    delete-device
    delete-profile
    device-add-profile
    device-get-default-profile
    device-get-profile-for-qualifier
    device-inhibit
    device-make-profile-default
    device-set-kind
    device-set-model
    device-set-serial
    device-set-vendor
    find-device
    find-device-by-property
    find-profile
    find-profile-by-filename
    get-devices
    get-devices-by-kind
    get-profiles
    get-sensor-reading
    get-sensors
    get-standard-space
    profile-set-filename
    profile-set-qualifier
    sensor-lock
    sensor-set-options
    '
__grub_script_check_program=grub-script-check
_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))'
_xspecs=([freeamp]="!*.@(mp3|ogg|pls|m3u)" [cdiff]="!*.@(dif?(f)|?(d)patch)?(.@([gx]z|bz2|lzma))" [bibtex]="!*.aux" [rgview]="*.@(o|so|so.!(conf|*/*)|a|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)" [oowriter]="!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|?(f)odt|ott|odm)" [chromium-browser]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))" [tex]="!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)" [netscape]="!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))"
.../..
_xinetd_services () 
{ 
    local xinetddir=/etc/xinetd.d;
    if [[ -d $xinetddir ]]; then
        local restore_nullglob=$(shopt -p nullglob);
        shopt -s nullglob;
        local -a svcs=($( printf '%s\n' $xinetddir/!($_backup_glob) ));
        $restore_nullglob;
        COMPREPLY+=($( compgen -W '${svcs[@]#$xinetddir/}' -- "$cur" ));
    fi
}
dequote () …
Run Code Online (Sandbox Code Playgroud)

shell bash function variable

2
推荐指数
1
解决办法
523
查看次数

标签 统计

bash ×2

bashrc ×1

command ×1

function ×1

shell ×1

terminal ×1

variable ×1