The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to deleting some files under subdirectory AdziE Shell Programming and Scripting 4 08-20-2008 09:05 AM
Count files in every subdirectory yorryk Shell Programming and Scripting 3 08-12-2008 06:22 PM
[Question]How to copy files to all subdirectory dzufauzan UNIX for Dummies Questions & Answers 2 07-09-2008 02:45 AM
Find files in directory and its subdirectory jyotib Shell Programming and Scripting 11 01-24-2008 04:19 PM
How can I copy files and subdirectory? odogbolu98 UNIX for Dummies Questions & Answers 3 02-15-2002 03:14 PM

Closed Thread
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
  #1 (permalink)  
Old 11-15-2008
megh megh is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
How Prevent from deleting subdirectory files

Hi All,
I am using the foolowing
find /home/vcrd/put -name '*.z' -mtime +5 -exec rm -f {} \;

in a shell script, it is deleting all file having *.z in /home/vcrd/put/appl sub directory. I donot want the files in the subdirectory are deleted.



Regards
Megh
  #2 (permalink)  
Old 11-15-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,585
use find -prune option
  #3 (permalink)  
Old 11-15-2008
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,122
find /home/vcrd/put -prune -o -name '*.z' -mtime +5 -exec rm -f {} \;
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 06:56 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