Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-03-2003, 10:49 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Question xargs: unmatched single quote

I am trying to do a replacment of the user and group nobody:nobody with apache:apache. chown is missing files, and xargs is giving me the following:

find / -user nobody -group nobody -print | xargs chown apache:apache

xargs: unmatched single quote

Any help is appreciated.

Thanks in Advance.

Old 10-03-2003, 05:49 PM   #2
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Rep: Reputation: 30
Try running without the xargs and showing what find gives xargs.
Also try running without xargs. find has the ability to do the same thing with the -exec command

info find "Actions" "Run Commands" "Single File"

For more explenation of this really neat tool
Find does a lot more then just finding files.
Old 06-05-2004, 10:04 PM   #3
LQ Newbie
Registered: Aug 2003
Posts: 4

Rep: Reputation: 0
I know your question was a long while back, but I just Googled for "xargs: unmatched single quote" and this was the top result, so I figured I'd add my $.02 here.

I was getting the same error, and found that my find command was returning filenames with single quotes (for example, "./mp3s/Rock/Ben Folds - Rockin' the Suburbs.mp3 "). This caused the unmatched single quote error in xargs. You could probably filter your find command through sed before xargs, but it's easier to use find -exec as teval suggests:

$ find / -user nobody -group nobody -exec chown apache:apache "{}" \;

where the files found are substitued for the braces, and the quotes around the braces will handle the odd single quote in a filename. Note that you end the -exec command with a semicolon, but escape it with a backslash to prevent the shell from seeing it as a separator.


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
xargs: unmatched single quote akudewan Linux - Newbie 5 07-28-2014 12:16 PM
Double and single quote, Question in expect evilchild Programming 4 08-22-2004 05:34 PM
xargs question reitzell Linux - Newbie 4 07-04-2004 02:36 AM
LogWatch Cron :: Unmatched Entries elvisious Linux - Software 2 06-23-2004 07:10 AM
Strange problem (Unmatched Entries) 2HostMe Linux - Newbie 2 01-10-2004 08:32 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:57 AM.

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