find: missing argument to `-exec‘ 已解决

简介: find: missing argument to `-exec‘ 已解决

如图

33fa5c2b10d3475181eec107c9d8a149.png

删除日志报错

解决办法

find /logs/ -mtime +25 -name "*.log" -exec rm -rf {} \;

最后的分号不能省!!!

最后的分号不能省!!!

最后的分号不能省!!!

相关文章
|
3月前
|
PyTorch 算法框架/工具 Python
Traceback (most recent call last):WARNING: Dataset not found, nonexistent paths:
这篇文章描述了在使用YOLOv5进行训练时遇到的"Dataset not found"错误,分析了可能的原因,包括网络连接问题和数据集路径配置错误,并提供了相应的解决方法,如检查网络设置和确认数据集文件的存放位置。
Traceback (most recent call last):WARNING: Dataset not found, nonexistent paths:
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
autoreconf: command not found
autoreconf: command not found
436 0
error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow
error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow
145 0
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
99 0
g++: command not found
g++: command not found
81 0
解决办法: error: passing ‘const VideoFrame’ as ‘this’ argument discards qualifiers [-fpermissive]
解决办法: error: passing ‘const VideoFrame’ as ‘this’ argument discards qualifiers [-fpermissive]
235 0
sed: 1: “s/os.remove(“/xx/xxx. ...“: invalid command code f
sed: 1: “s/os.remove(“/xx/xxx. ...“: invalid command code f
Error: invalid option: --with-training-tools
Error: invalid option: --with-training-tools
166 0
find: missing argument to `-exec'
今天使用find命令查找删除文件时,遇到下面错误,这个是因为在{}和\之间必须要有空格,否则会报上面的错。 以前都没有注意到这个细节,特此记录一下。   [root@DB-Server full]#  find  .
1433 0