LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-06-2007, 01:22 PM   #1
hinetvenkat
Member
 
Registered: Nov 2004
Location: Mumbai
Posts: 80

Rep: Reputation: 15
Find with -exec argument - not giving proper output..how to find...


Hi

When i am using the 'find' command using -exec option, i am getting the error like as follows.

[root@cheetah scripts]# find / -name test1 -exec ls -l {}\\;
find: missing argument to `-exec'
[root@cheetah scripts]#

what i am missing here...

thanks
 
Old 08-06-2007, 01:30 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
Code:
find / -name test1 -exec ls -l {} \;
Works for me (note the space and the removal of one \). You may need to enclose the {} in single quotes, as mentioned in find's man page.
 
Old 01-24-2010, 05:24 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
You are missing the 'path' argument. e.g.
Code:
 find . -exec #...
or more clearly
Code:
find /raid/data/incremental-backup -exec #...
 
Old 01-24-2010, 07:42 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,280

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I think the above post is directed at a different thread
 
Old 01-25-2010, 06:19 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
Quote:
Originally Posted by chrism01 View Post
I think the above post is directed at a different thread
It got deleted/moved.
 
  


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
find: missing argument to `-exec' pavodive Linux - Newbie 4 10-05-2009 02:24 PM
find -exec syntax: bug in find? mfcarroll Programming 5 06-21-2007 07:13 PM
find -exec help dc144 Linux - Newbie 3 10-12-2006 02:14 AM
find -exec question eantoranz Linux - General 1 06-26-2004 10:57 AM
find -exec cricbk Linux - Newbie 4 01-05-2004 07:03 PM


All times are GMT -5. The time now is 02:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration