linux – Page 3 – 业余语言练习

frps

#这是ECS服务器端专用配置 [common] bin_addr = 0.0.0.0 bind_port = 7000 token = 52010 vhost_http_port = 800 vhost_https_port = 443 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin enable_prometheus = true [web-http] listen_port=8080 log_file = /var/log/frps.log log_level = info log_max_days = 3

Published
Categorized as linux

screen

screen的作用是建立新的进程,关闭当前窗口,程序继续执行。非常适用于linux远程 root115@115:~/Downloads$ ls -lth total 8.8G -rw-r–r– 1 root root 4.6G Mar 30 15:22 CentOS-Stream-10-latest-x86_64-dvd1.iso -rw-r–r– 1 root115 root115 240 Mar 30 09:15 wget -rw-r–r– 1 root root 819M Mar 24 12:20 CentOS-Stream-10-latest-x86_64-boot.iso root115@115:~/Downloads$ screen -ls  //列出进程 There is a screen on: 2382.wget (Detached) 1 Socket in /home/root115/.screen. root115@115:~/Downloads$ screen -r 2382  //查看进程 root115@115:~/Downloads$ screen… Continue reading screen

Published
Categorized as linux

firewall-cmd

root@115:~# firewall-cmd –list-ports 20/tcp 21/tcp 22/tcp 80/tcp 443/tcp 39000-40000/tcp root@115:~# firewall-cmd –remove-port=39000-40000/tcp –permanent success root@115:~# firewall-cmd –list-ports 20/tcp 21/tcp 22/tcp 80/tcp 443/tcp 39000-40000/tcp root@115:~# firewall-cmd –remove-port=39000/tcp –permanent Warning: NOT_ENABLED: 39000:tcp success root@115:~# firewall-cmd –remove-port=40000/tcp –permanent Warning: NOT_ENABLED: 40000:tcp success root@115:~# firewall-cmd –reload success root@115:~# firewall-cmd –list-ports 20/tcp 21/tcp 22/tcp 80/tcp 443/tcp root@115:~# firewall-cmd –add-port=6115/tcp –permanent… Continue reading firewall-cmd

Published
Categorized as linux

find

find命令是Linux系统中非常重要也是很常用的命令之一,可以根据指定的参数搜索以及定位文件和目录的列表,可以通过权限、用户、用户组、文件类型、日期、大小和其他可能的条件来查找文件 第一:使用find命令查找/etc目录下名字是inittab的文件,执行 find  /etc/  -name   inittab -name为参数,表示名字 第二:在当前目录下,找到文件名是inittab的文件,首先进入目录,执行 find .  -name inittab 其中”.” 表示当前目录 第三:查找名字是tmp的文件夹,执行命令 find   /etc -typd d  -name tmp 其中/etc表示在etc目录下搜索 -type d表示执行指定为文件夹 第四:找到/tmp目录下的.log文件,并将其删除掉,执行命令 find /tmp  -type f  -name *.log  -exec rm -rf {} \; 其中-type f表示执行文件类型 -exec表示执行命令 第五:查找/var/log目录下30天以前修改的文件,执行命令 find /var/log -type f -mtime  +30 如果是-30则表示30天以内

Published
Categorized as linux

libreoffice

root135@root135:~/Downloads/LibreOffice_25.2.0.3_Linux_x86-64_deb$ pwd /home/root135/Downloads/LibreOffice_25.2.0.3_Linux_x86-64_deb sudo dpkg -i /home/root135/Downloads/LibreOffice_25.2.0.3_Linux_x86-64_deb/DEBS/ 安装完成之后,命令行libreoffice会出现bash: libreoffice: command not found whereis root135@root135:~$ whereis libreoffice libreoffice: /etc/libreoffice /usr/local/bin/libreoffice root@root135:/usr/local/bin# ls -lth total 36K lrwxrwxrwx 1 root root 36 Jan 24 20:32 libreoffice25.2 -> /opt/libreoffice25.2/program/soffice -rwxr-xr-x 1 root staff 233 Nov 6 20:01 normalizer -rwxr-xr-x 1 root staff 214 Nov 6 20:01 pyspnego-parse -rwxr-xr-x 1… Continue reading libreoffice

Published
Categorized as linux