报错代码
......: No such file or directory
解决方法
# zypper in insserv-compat
......: No such file or directory
# zypper in insserv-compat
# cat /etc/resolv.conf
search eternalcenter.com local new
nameserver 8.8.8.8
# host -a zhumingyu
Trying "zhumingyu.eternalcenter.com"
Trying "zhumingyu.local"
Trying "zhumingyu.new"
Trying "zhumingyu"
Host zhumingyu not found: 3(NXDOMAIN)
Received 102 bytes from 8.8.8.8#53 in 62 ms
(补充:当查询 zhumingyu 时,也就是中间没有点 “.”,则默认会被视为查询主机名,会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询,最后才查询 zhumingyu)
# host -a zhumingyu.com
Trying "zhumingyu.com"
Received 31 bytes from 1.1.1.1#53 in 217 ms
Trying "zhumingyu.com.eternalcenter.com"
Trying "zhumingyu.com.local"
Trying "zhumingyu.com.new"
Host zhumingyu.com.new not found: 4(NOTIMP)
Received 35 bytes from 1.1.1.1#53 in 218 ms
(补充:当查询 zhumingyu.com 时,也就是中间有 1 个点 “.”,则默认会被视为查询域名,会先查询 mingyuzhu.com,如果查询失败,则会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询)
# host -a zhumingyu.com.
Trying "zhumingyu.com"
Host zhumingyu.com not found: 4(NOTIMP)
Received 31 bytes from 1.1.1.1#53 in 204 ms
Received 31 bytes from 1.1.1.1#53 in 204 ms
(补充:当查询 zhumingyu.com. 时,也就是末尾有 1 个点 “.”,默认会被视为查询域名,且只会查询这个域名。不会查询 search 里的每 1 项)
sftp> ls
sftp> lls
sftp> pwd
sftp> lpwd
sftp> version
sftp> help
sftp> mkdir <directory>
sftp> lmkdir <directory>
sftp> rmdir <directory>
sftp> lmkdir <directory>
sftp> chown <user> <directory>
sftp> chgrp <group> <directory>
sftp> chmod <privilege> <directory>
sftp> cd <directory>
sftp> lcd <directory>
sftp> rm <file>
sftp> lrm <file>
移动远程文件
sftp> mv <file>
sftp> get <file>
sftp> put <file>
退出 SFTP
sftp> exit
或者:
sftp> quit
# mount -o remount,noexec,nodev /dev/shm
# vim /etc/fstab
添加以下内容:
......
/dev/shm /dev/shm tmpfs defaults,rw,remount,noexec,nodev 0 0
# mount -a
# mount | grep -E '\s/dev/shm\s' | grep -v noexec ; mount | grep -E '\s/dev/shm\s' | grep -v nodev
(补充:当没有任何输出结果时,则代表 /dev/shm 目录的执行权限已被禁止)
# dnf install mlocate
# updatedb
(
注意:如果不更新 locate 数据库,在使用 locate 命令后可能会报错
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
)
1) -b 或者 –basename 只显示使用指定模式匹配名称的条目
2) -c 或者 –count 只显示找的数量
3) -e 或者 –existing 只显示存在的条目
4) -i 或者 –ignore-case 查找时忽略大小写
5) -r 或者 –regexp 使用正则表达式
6) –regex 使用扩展正则表达式
# locate passwd
# locate /etc/sh
# locate -i ~/r
# locate -r [1-2].txt