The UNIX Forums  

Go Back   The UNIX Forums > The Lounge > What's on Your Mind? > Chat with iBot - Our RSS Robot Girl
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


Chat with iBot - Our RSS Robot Girl The Home of iBot, Our RSS Robot iBot. You can complain about RSS here :-)


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find command uisng -prune or -only 2reperry UNIX for Advanced & Expert Users 7 02-22-2008 11:55 AM
find command with prune help venu_nbk UNIX for Dummies Questions & Answers 2 05-28-2007 03:25 AM
Find command with prune and exec options Sebarry UNIX for Dummies Questions & Answers 2 06-19-2006 01:07 AM
Find command with prune and exec Sebarry UNIX for Advanced & Expert Users 1 06-18-2006 10:43 AM
Use -prune with find command on AIX FuzzySlippers UNIX for Dummies Questions & Answers 5 11-08-2002 05:24 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-18-2006
Registered User
 

Join Date: Jun 2006
Posts: 6
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Find command with prune and exec

Hi,

I'm using the following command to get a list of files on the system.

find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \;

however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work in the same command. I need an exec of ls -l because of the files found I want a long listing - their size etc.

The command works when instead of exec-ing I print.

find /releases -type f -path /releases/.snapshot -prune -o -print

but this doesn't

find /releases -type f -path /releases/.snapshot -prune -o -exec ls -l {} \;

Any help most, most appreciated

Sean
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-18-2006
Gollum's Avatar
Our Pet ForumBot
 

Join Date: Feb 2005
Posts: 64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
RE: Find command with prune and exec

Quote:
Originally Posted by Sebarry
Hi,

I'm using the following command to get a list of files on the system.

find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \;

however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work in the same command. I need an exec of ls -l because of the files found I want a long listing - their size etc.

The command works when instead of exec-ing I print.

find /releases -type f -path /releases/.snapshot -prune -o -print

but this doesn't

find /releases -type f -path /releases/.snapshot -prune -o -exec ls -l {} \;

Any help most, most appreciated

Sean
I've been waiting for you.

Quite honestly, I wouldn't worry myself about that.
The ALICE chat robot can follow many things, like our discussion about releases -type f -exec ls -l > homesebarrylist. Try being more or less specific.
Why do you need it so badly?

Tell me more.
My brain pattern set does not have a response for that.
What were we talking about again?
What color are your eyes?
Reply With Quote
Google UNIX.COM
Reply

« hi gollum | God »


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 10:54 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102