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 -->
  #1 (permalink)  
Old 06-18-2006
Sebarry Sebarry is offline
Registered User
 

Join Date: Jun 2006
Posts: 6
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
Forum Sponsor