The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using a pipe with find .... -exec ... pmallas UNIX for Advanced & Expert Users 1 01-29-2008 05:14 PM
How can I execute own ksh function in find -exec piooooter Shell Programming and Scripting 11 04-03-2007 07:44 AM
find command exec error pavan_test UNIX for Dummies Questions & Answers 2 06-13-2006 04:58 AM
find and exec big123456 UNIX for Advanced & Expert Users 2 01-02-2006 12:10 PM
find . -type d -exec cd {} \; shimont UNIX for Dummies Questions & Answers 2 11-23-2005 11:42 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-10-2007
shriashishpatil shriashishpatil is offline
Registered User
  
 

Join Date: Dec 2005
Location: Pune
Posts: 81
query about find and -exec

Hi,
i have query about "find" command. Do I need to put the command after -exec in single quotes? Why?

For ex. see output of these three find commands.

Quote:
$ find . -ctime -2
.
$
Quote:
$ find . -ctime -2 -exec ls -lrt {} \;
total 1648
-rw-rw-r-- 1 tlswrk14 aimsys 0 Mar 9 10:06 Shutdown_pm1Dispatcher_DSN1_0_3889.done
-rw-rw-r-- 1 tlswrk14 aimsys 0 Mar 9 10:49 Shutdown_pm1Dispatcher_DSN1_0_21508.done
-rw-rw-r-- 1 tlswrk14 aimsys 425461 Mar 13 15:40 Event1771_20070313_154002.xml
-rw-rw-r-- 1 tlswrk14 aimsys 388773 Mar 13 16:10 Event1771_20070313_161055.xml
$
Quote:
$find . -ctime -2 -exec 'ls -l' {} \;
$
Any explanations?

cheers,
-Ashish
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0