The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

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
query about find and -exec shriashishpatil UNIX for Advanced & Expert Users 2 04-12-2007 01:16 AM
Find command with prune and exec Sebarry UNIX for Advanced & Expert Users 1 06-18-2006 01:43 PM
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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-23-2008
vijay_0209 vijay_0209 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 52
| with find -exec

can we use |(pipe operator) with find -exec.....?

or can pipe the output of find command to another command...?

if not, why...?

pls explain
  #2 (permalink)  
Old 12-23-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
Your question is not very clear.

Quote:
Originally Posted by vijay_0209 View Post
can we use |(pipe operator) with find -exec.....?
Yes, this can be done
Quote:
or can pipe the output of find command to another command...?

if not, why...?

pls explain
this as well is possible
  #3 (permalink)  
Old 12-23-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
is worth mention that if you use something like this
find / -name * --exec date | less
you will see the date printed for each file find founds (wich are all in /)

the pipe will get the output of the command you execute, not the list of files
  #4 (permalink)  
Old 04-22-2009
Jeroen Ruiijter Jeroen Ruiijter is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 1
find -exec what's wrong here ?

I want to compress very much directories to the responding file name.


find 2009* -type d -exec tar c --remove-files {} |lzma -z9 > {}.tar.lzma \;

error
lzma ;: doesn't exist or is not a regular file
find: missing argument to '-exec'

thanx anyone in advance

Jeroen
Closed Thread

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 01:38 PM.


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