Article 6M39E find: unknown predicate `- filesdpx/2024-01-28/dtx_2024-04-10_reference.txt

find: unknown predicate `- filesdpx/2024-01-28/dtx_2024-04-10_reference.txt

by
kancla
from LinuxQuestions.org on (#6M39E)
I want to find all files in a directory called 'project' inside this directory there is a lot of different directory with the criteria */*/*20* -maxdepth 1 -type f -mmin +$((730 * 1440)) -not -path 'Archive/*' -not -path 'orphan'. After finding the files with the mentioned criteria, I want those files to be moved to the 'files.txt' file. However, while running this script: find */*/*20* -maxdepth 1 -type f -mmin +$((730 * 1440)) -not -path 'Archive/*' -not -path 'orphan/*' > files.txt
I am getting the error 'unknown predicate for find command,' which indicates that certain files have a hyphen at the beginning and a space between the hyphen and the filename. How can I fix that? I ran this line in a bash script.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments