Linux 下常用命令

阅读: 评论:0

Linux 下常用命令

Linux 下常用命令

一、查找文件

1.1 根据名称查询文件(知道名称不知道路径)

[root@localhost ~]# find / -name auth.jar
/cljj/app/wallgold/auth/auth.jar
[root@localhost ~]# locate auth.jar
/cljj/app/wallgold/auth/20190729auth.jar
/cljj/app/wallgold/auth/20191008auth.jar
/cljj/app/wallgold/auth/auth.jar

1.2 根据部分名称查询

find  /etc  -name 'auth*':查找以auth开头的文件

find  /etc  -name '*auth*':查询包含auth的文件

[root@localhost ~]# find /etc -name 'auth*'
/etc/pam.d/authconfig-tui
/etc/pam.d/authconfig-gtk
/etc/pam.d/authconfig
/etc/sysconfig/authconfig
/etc/security/console.apps/authconfig-tui
/etc/security/console.apps/authconfig-gtk
/etc/security/console.apps/authconfig
[root@localhost ~]# find /etc -name '*auth*'
/etc/pam.d/system-auth-ac
/etc/pam.d/system-config-authentication
/etc/pam.d/system-auth
/etc/pam.d/authconfig-tui
/etc/pam.d/authconfig-gtk
/etc/pam.d/smartcard-auth
/etc/pam.d/fingerprint-auth-ac
/etc/pam.d/smartcard-auth-ac
/etc/pam.d/password-auth-ac
/etc/pam.d/password-auth
/etc/pam.d/authconfig
/etc/pam.d/fingerprint-auth
/etc/sysconfig/authconfig
/etc/sysconfig/saslauthd
/etc/f.d
/etc/f.f
/etc/polkit-1/localauthority
/etc/security/console.apps/system-config-authentication
/etc/security/console.apps/authconfig-tui
/etc/security/console.apps/authconfig-gtk
/etc/security/console.apps/authconfig
/etc/rc.d/rc2.d/K10saslauthd
/etc/rc.d/rc5.d/K10saslauthd
/etc/rc.d/rc0.d/K10saslauthd
/etc/rc.d/init.d/saslauthd
/etc/rc.d/rc3.d/K10saslauthd
/etc/rc.d/rc4.d/K10saslauthd
/etc/rc.d/rc1.d/K10saslauthd
/etc/rc.d/rc6.d/K10saslauthd
/etc/setuptool.d/98system-config-authentication
/etc/setuptool.d/99authconfig

 

二 、查询端口

2.1 查询端口是否被占用

netstat  -anp  |grep   端口号

[root@localhost ~]# netstat -anp|grep 8080
tcp        0      0 127.0.0.1:8080              0.0.0.0:*                   LISTEN      481/unicorn worker[ 

netstat   -nultp  查看当前所有已经使用的端口情况

[root@localhost ~]# netstat -nultp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2330/sshd           
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      2423/master         
tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN      13153/sshd          
tcp        0      0 0.0.0.0:8060                0.0.0.0:*                   LISTEN      17832/nginx         
tcp        0      0 127.0.0.1:9121              0.0.0.0:*                   LISTEN      18256/redis_exporte 
tcp        0      0 127.0.0.1:9187              0.0.0.0:*                   LISTEN      17863/postgres_expo 
tcp        0      0 127.0.0.1:9093              0.0.0.0:*                   LISTEN      17711/alertmanager  
tcp        0      0 0.0.0.0:6379                0.0.0.0:*                   LISTEN      2429/redis-server 0 
tcp        0      0 127.0.0.1:9100              0.0.0.0:*                   LISTEN      17844/node_exporter 
tcp        0      0 127.0.0.1:9229              0.0.0.0:*                   LISTEN      17776/gitlab-workho 
tcp        0      0 127.0.0.1:8080              0.0.0.0:*                   LISTEN      481/unicorn worker[ 
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      17832/nginx         
tcp        0      0 127.0.0.1:9168              0.0.0.0:*                   LISTEN      17764/puma 3.12.0 ( 
tcp        0      0 127.0.0.1:8082              0.0.0.0:*                   LISTEN      18295/sidekiq 5.2.7 
tcp        0      0 127.0.0.1:9236              0.0.0.0:*                   LISTEN      17740/gitaly        
tcp        0      0 :::8085                     :::*                        LISTEN      32265/java          
tcp        0      0 :::8086                     :::*                        LISTEN      31932/java          
tcp        0      0 :::22                       :::*                        LISTEN      2330/sshd           
tcp        0      0 :::8087                     :::*                        LISTEN      32084/java          
tcp        0      0 :::8088                     :::*                        LISTEN      32587/java          
tcp        0      0 :::3000                     :::*                        LISTEN      30827/node          
tcp        0      0 :::8089                     :::*                        LISTEN      32425/java          
tcp        0      0 ::1:6010                    :::*                        LISTEN      13153/sshd          
tcp        0      0 :::9094                     :::*                        LISTEN      17711/alertmanager  
tcp        0      0 :::9001                     :::*                        LISTEN      482/java            
tcp        0      0 :::9002                     :::*                        LISTEN      7743/java           
tcp        0      0 ::1:9168                    :::*                        LISTEN      17764/puma 3.12.0 ( 
tcp        0      0 :::30001                    :::*                        LISTEN      31626/node          
udp        0      0 :::9094                     :::*                                    17711/alertmanager

三 查询Linux系统是多少位

  3.1 uname -a

[root@localhost ~]# uname -a
Linux localhost 2.6.32-754.14.2.el6.x86_64 #1 SMP Tue May 14 19:35:42 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

3.2 getconf  LONG_BIT

[root@localhost ~]# getconf LONG_BIT
64

 

本文发布于:2024-01-31 05:29:24,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170665016525898.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:常用命令   Linux
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23