The UNIX and Linux Forums  

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 here.

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-28-2006
Registered User
 

Join Date: Mar 2006
Posts: 22
-d

why we use -d in script?
Reply With Quote
Forum Sponsor
  #2  
Old 03-28-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,698
Quote:
Originally Posted by debasis.mishra
why we use -d in script?
-d can be used for so many things. Unless you show us the code snippet, it is hard to give a definitive answer.

Guessing... look into man test to see about -d.
Reply With Quote
  #3  
Old 03-28-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Where is this -d being used? Is it for a particular command? If so, then check the man page for that command.
Reply With Quote
  #4  
Old 03-28-2006
Registered User
 

Join Date: Mar 2006
Posts: 22
reply about -d

Actually my friend using the -d in this code.

if [ -d $LOG_DIR ]
then
cd $LOG_DIR
echo $LOG_DIR >> $LOG_FILE
find . \( -name '*.log*' -type f \) -mtime +30 -exec rm -f {} \;
fi
Reply With Quote
  #5  
Old 03-28-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,698
As I said ealier, look into man test to see the description about -d
Reply With Quote
  #6  
Old 03-28-2006
Registered User
 

Join Date: Mar 2006
Posts: 22
i got the solution.thanks
Reply With Quote
  #7  
Old 03-28-2006
Registered User
 

Join Date: Mar 2006
Posts: 22
will u tell me what is this meaning?

find . \( -name '*.log*' -type f \) -mtime +30 -exec rm -f {} \;

What it will search the file which is less than 30 minutes?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mtime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:43 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