经常使用命令

使用 rpm -qal |grep mysql 查看mysql所有安装包的文件存储位置

加权限命令

chmod 755 influxd.sh             给文件加权限
chmod -R 755 /var/ftp/pud      给文件夹加权限

查看之前使用过的命令

history 

清楚内存缓存

sync

echo 3 > /proc/sys/vm/drop_caches

查看网络使用情况

iftip -i em1

查看所有端口

netstat -a 

查看端口占用情况

netstat -tunlp

查看某端口占用情况

netstat -tunlp | grep 端口号

查找文件名:

[root@CC0329 ~]# find / -name "*.c"
/usr/share/bison/yacc.c
/usr/share/bison/glr.c
/usr/share/tk8.5/tkAppInit.c
/usr/share/tcl8.5/tclAppInit.c
/usr/share/doc/systemd/sd-readahead.c
/usr/share/doc/mpfr-3.1.1/mpfr/examples/version.c

查看当前目录下文件:

[root@CC0329 ~]# find -type f
./.bash_profile
./.bash_history
./.cshrc
./.viminfo
./.tcshrc
./.python_history
./.cache/pip/selfcheck.json
./.cache/pip/http/a/1/9/5/3/a19537d3cf37c122db841d6fe4cd322bc10d1a558bb00d146b85cb9a
./.cache/pip/http/a/6/9/b/d/a69bdb984343de3b3653d7a852dbd14dd4ccdd03ced4b06d1352ba0b
./.cache/pip/http/5/7/9/2/a/5792a9f9f8da35db32d575edd08551ae1ee4fb12e0b68bb769fe8c8f
./.cache/pip/http/b/b/8/7/6/bb876b2e6a22c2739002e9ef3388ae978b7a6192a19fe67d8b0030f2
./.cache/pip/http/0/8/4/f/5/084f5a8368fb89a7efa9c04f435e93864cabf099a23e186572afd976
./.cache/pip/http/f/e/d/0/e/fed0ed508030b766d5b0c2792132c8bf197804464765b46b361f93a4
./.bashrc
./.bash_logout
./anaconda-ks.cfg

开机自启使用命令
服务段启动

supervisord -c /etc/supervisord.conf 

supervisorctl 常用命令
把es 换成all 可以管理配置中的所有进程

supervisorctl status:查看所有进程的状态
supervisorctl stop es:停止es
supervisorctl start es:启动es
supervisorctl restart es: 重启es
supervisorctl update :配置文件修改后可以使用该命令加载新的配置
supervisorctl reload: 重新启动配置中的所有程序

查看已安装软件

[root@K230804 ~]# rpm -qa|grep arp
python-deltarpm-3.6-3.el7.x86_64
deltarpm-3.6-3.el7.x86_64
perl-Carp-1.26-244.el7.noarch

查看能否安装软件

[root@K230804 ~]# yum list installed | grep  arp
deltarpm.x86_64                       3.6-3.el7                       @base     
perl-Carp.noarch                      1.26-244.el7                    @base     
python-deltarpm.x86_64                3.6-3.el7                       @base  

安装arp

[root@localhost ~]# yum -y install net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                                                                     |  18 kB  00:00:00     
 * base: repo.virtualhosting.hk
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * extras: centos.uhost.hk
 * updates: repo.virtualhosting.hk
base                                                                                                                                                                     | 3.6 kB  00:00:00     
epel                                                                                                                                                                     | 5.3 kB  00:00:00     
extras                                                                                                                                                                   | 3.4 kB  00:00:00     
updates                                                                                                                                                                  | 3.4 kB  00:00:00     
(1/2): epel/x86_64/updateinfo                                                                                                                                            | 994 kB  00:00:00     
(2/2): epel/x86_64/primary_db                                                                                                                                            | 6.8 MB  00:00:06     
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================
 Package                                     Arch                                     Version                                                      Repository                              Size
================================================================================================================================================================================================
Installing:
 net-tools                                   x86_64                                   2.0-0.24.20131004git.el7                                     base                                   306 k

Transaction Summary
================================================================================================================================================================================================
Install  1 Package

Total download size: 306 k
Installed size: 918 k
Downloading packages:
net-tools-2.0-0.24.20131004git.el7.x86_64.rpm                                                                                                                            | 306 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.24.20131004git.el7.x86_64                                                                                                                                    1/1 
  Verifying  : net-tools-2.0-0.24.20131004git.el7.x86_64                                                                                                                                    1/1 

Installed:
  net-tools.x86_64 0:2.0-0.24.20131004git.el7                                                                                                                                                   

Complete!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值