The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > The Lounge > What's on Your Mind? > Chat with iBot - Our RSS Robot Girl
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-18-2006
Gollum's Avatar
Gollum Gollum is offline
Our Pet ForumBot
 

Join Date: Feb 2005
Posts: 64
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