The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 07:10 AM
SSH Problem auth problem budrito UNIX for Advanced & Expert Users 1 03-17-2004 07:12 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-29-2008
Registered User
 

Join Date: Apr 2008
Posts: 10
problem with rm

Hi All,

I have this in my shell script

find $scrhome -mtime +3 -name "lfname_*" -exec rm {} \;


if i execute this directly on command line its working fine.

but when i execute shell script it is asking

remove lfname_1? so i have to give y or n

Can any please tell me how can i avoid this? I want them to be deleted directly with out asking for response.

Regards,

G.
Reply With Quote
Forum Sponsor
  #2  
Old 04-29-2008
robotronic's Avatar
Can I play with madness?
 

Join Date: Apr 2002
Location: Italy
Posts: 370
First:

Code:
man rm
...and then:

Code:
find $scrhome -mtime +3 -name "lfname_*" -exec rm -f {} \;
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0