View all Linux command execution orders and numbers

1. Preamble

In the course of our journey, we sometimes want to list all the commands supported by Linux on this server, i.e., all enforceable orders (including aliases and functions from the bash shell). If you need one, try it.compgenCommand. This document is about to be used for the following purposes:compgenRole and use of orders

查看Linux所有可以执行的命令

2. compgenCases of use

[root@zcwyou ~]# compgen -c
Bash

cp output top root l. lls mv rm which if then elif fi case eac for proper until doe in funcing time {}! More unshowed keywords!findCommand

[root@zcwyou ~]# compgen -c |grep find
Bash

Findfs btrifs-find-root find oldfinind nl-link-ifindex2namenl-link-name2findex findbint2perl

[root@zcwyou ~]# compgen -c | wc -l
Bash

1288

查看本系统目前有多少命令可执行

View the number of commands this user can execute

[root@zcwyou ~]# echo "USER user can run(compgen -c | wc -l) commands on $HOSTNAME."
Bash

查看本用户有权限执行的命令数量

Output results, root user can run 1288 commands on CentOS7.linuxrummen.com.aliasesDefined alias

[root@zcwyou ~]# compgen -a
Bash

cp esgreep grep l. lls mv rm which looks at embedded commands

[root@zcwyou ~]# compgen -b
Bash

.: [alias bg bind break biltin caller cd compgen complete view bash keywords]

[root@zcwyou ~]# compgen -k
Bash

If then otherwise fi case eac for self-suspect while until doe in funcing view all the functions of bah

[root@zcwyou ~]# compgen -A function
Bash

3. Linux commands

By the way, please describe several commonly used commands: lls [option(s)] [file(s)] ls commands for the contents of files and subdirectories that list target directories. By default, only directories and filenames are shown in simple form. cp [option(s)] sourcefile profile
cpCommand to copy a directory or file to a specific directory. mv [option(s)] sourcefile profile
mvCommand used to move or rename files rm [option(s)] file(s)
rmCommand to delete files or directories, with the possibility of deleting multiple directories or files at a time
lncommand creates an internal link from the source file to the target file by a different name. Usually, such a link is directly directed at the source file on the same file system. However, using-s option In, a symbol link will be created that points only to the directory in which the source file is located, thus enabling links across files. cd [options(s)] [directory]
cdCommand to switch the current working directory. mkdir [option(s)] directoryname
mkdirCreate directory rmdir [option(s)] directoryname
rmdirFor deleting an empty directory
chownUse to modify the file or owner. chgrp [option(s)] groupname file(s)
chgrpThe order transfers the ownership of a given document to a group with a specified name. [options] file(s) mode
chmodThe command is used to modify the permissions of a file or directory, including the permissions of this user, the privileges of the same group of users, and those of other users.

未经允许不得转载:萌萌Apprentissage » View all Linux command execution orders and numbers

Like (0) 打赏

Comments 0

Protected with IP Blacklist CloudIP Blacklist Cloud
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

//下一个脚本特效
//下一个脚本