LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-11-2019, 09:48 AM   #1
smartdba
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Rep: Reputation: Disabled
Red face "find: unknown predicate" with folder names


Hi

I have several folders with starting with a "-" in the folder names. They work with most commands, but the find command fails with and unknown predicate. I tried single quotes, double quotes, e\ etc.. but no luck.

Folder example

drwxrwxr-x 2 user group 6 Oct 11 10:33 - test

[user@machine ~]$ find "- test" -name "*.jpeg"
find: unknown predicate `- test'

[user@machine ~]$ find '- test' -name "*.jpeg"
find: unknown predicate `- test'


Please help!

Joe
 
Old 10-11-2019, 09:58 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,782

Rep: Reputation: Disabled
find "./- test" -name "*.jpg"
 
1 members found this post helpful.
Old 10-11-2019, 10:00 AM   #3
smartdba
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you very much Ser. It worked perfectly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recursively merge directories or folders into one, retaining folder names in file names stozi Linux - General 6 05-22-2019 01:16 AM
[SOLVED] Burning with cdw: file names are too long, try "Long Joliet file names" lucmove Linux - Software 3 02-21-2017 06:06 AM
[SOLVED] Find statement for multiple folder names rjo98 Linux - Newbie 15 01-21-2010 07:29 PM
How to get the "data type" of an "unknown variable" in "C Language" ? Affair Programming 8 06-20-2009 12:30 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration