How to solve the find: paths must precede expression error in linux
This article introduces the relevant knowledge of "find in linux: how to solve paths must precede expression errors". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Problem description
[root@single shareplex_health_check] # find ${v_dir_name} /-name'${log_name} *'- mtime + 3-exec rm-rf {}\ find: paths must precede expression:
Solve
(1) if you look for multiple files after-name, you need to use single quotation marks; (2) if you use * wildcards, you need to use single quotation marks or escape with\ (3)-exec is preceded by a horizontal line in Chinese format, and an incorrect format requires the use of English minus marks.
The correct information is as follows
[root@single shareplex_health_check] # find splex_check_log/-name 'shareplex_check_report*'-mtime + 1-exec rm-f {}\; "find in linux: how to solve paths must precede expression errors" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!