目录[TOC]dropdrop user XXX;删除已存在的用户,默认删除的是'XXX'@'%'这个用户,如果还有其他的用户如'XXX'@'localhost'等,不会一起被删除。如果要删除'XXX'@'localhost',使用drop删除时需要加上host即drop user 'XXX'@'localhost';。deletedelete from user where user='XXX' and host='localhost';其中XXX为用户名,localhost为主机名。区...
cat >/etc/apt/sources.list <<EOF
deb http://mirrors.aliyun.com/debian stable main contrib non-free
deb http://mirrors.aliyun.com/debian stable-proposed-updates main contrib non-free
deb http://mirrors.aliyun.com/debian stable-updates main...
python删除空文件夹import os
def delete_gap_dir(dir):
if os.path.isdir(dir):
for d in os.listdir(dir):
#print('1',os.path.join(dir, d))
path = os.path.join(dir, d)
if os.path.isdir(path) and not path.endswith('pic_neg'):
...
python递归遍历路径下的所有文件夹,并输出所有文件的绝对路径import os
OriPath = r'/home' #需要遍历的文件夹
for root, dirs, files in os.walk(OriPath, topdown=False):
for name in files:
print(os.path.join(root, name))
目录[TOC]前言介于种种原因,如docker版本开启ipv6需要host,下载完成后运行脚本需要用到外部环境里的软件,不得不放弃docker版本qbittorrent,进而转向非docker版。在宿主机直接装软件的弊端就是,每次删软件的时候,都要去网上搜索linux如何彻底卸载xxx,唉,真不想在宿主机直接安装。版本选择qbittorrent--qBittorrent with GUIqbittorrent-nox--服务器一般安装这个,这个有web-ui步骤通过PPA来安装sudo a...
目录[TOC]报错systemd挂载远程硬盘后,systemctl status xxxx报错如下Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH解决方法apt -y install fuse
目录[TOC]报错在Debian使用docker时遇到如下报错,所有容器都是这样:其中xxx_container_name是对应容器的名字Creating xxx_container_name ... error
ERROR: for xxx_container_name Cannot start service xxx_container_name: AppArmor enabled on system but the docker-default profile could not...
通过ip进入网页报错:/usr/lib/lua/luci/dispatcher.lua:461: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
/usr/lib/lua/luci/dispatcher.lua:461: in function 'createtree'
/usr/lib/lua/luci/dispatcher...