大网数据广告活动
服务器运维问答

Running clamscan with the file list function

· 52CE 我爱测

I am trying to schedule some tasks using ClamAV but it cannot find the find the file that contains the directories I want it to scan. *Using sudo doesn't work. *The files are set with permissions 644. *Files are visible in comman…

问题原文

原帖链接 · NoNo · CC BY-SA 4.0

I am trying to schedule some tasks using ClamAV but it cannot find the find the file that contains the directories I want it to scan.

  *Using sudo doesn't work.
  *The files are set with permissions 644.
  *Files are visible in command line as white.

My goal is to use these lists so that different folders of the server can be scanned during low usage times. I am running this on CentOS 7.

[ENTRY]
#clamscan -r -i –file-list=/home/web_folders.txt --log=/var/log/clamav/clamscan_web.log

[ERROR]
–file-list=/home/web_folders.txt: No such file or directory
WARNING: –file-list=/home/web_folders.txt: Can't access file

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

You copied and pasted a Unicode character that looks like a hyphen, but is not actually.

The character you pasted was –, which an en dash.

The actual character you should be using is -, which is a plain hyphen as it appears on your keyboard. In this case you should have two of them, i.e. --file-list=...

This is an error in whatever tutorial you were reading. Some content management systems change hyphens into Unicode dashes if they aren't properly escaped in that CMS's editor.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-09-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。