The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Shell Programming and Scripting
-d
Tags
mtime
,
shell scripts
Login to Discuss or Reply to this Discussion in Our Community
Page 1 of 2
1
2
>
Thread Tools
Search this Thread
Top Forums
Shell Programming and Scripting
-d
#
1
03-29-2006
debasis.mishra
Registered User
23,
0
Join Date: Mar 2006
Last Activity: 3 March 2011, 4:53 PM EST
Posts: 23
Thanks Given: 0
Thanked 0 Times in 0 Posts
-d
why we use -d in script?
debasis.mishra
View Public Profile for debasis.mishra
Find all posts by debasis.mishra
#
2
03-29-2006
vino
Registered User
2,848,
14
Join Date: Feb 2005
Last Activity: 10 August 2018, 5:24 AM EDT
Location: Sydney, Down Under
Posts: 2,848
Thanks Given: 0
Thanked 14 Times in 14 Posts
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.
vino
View Public Profile for vino
Find all posts by vino
#
3
03-29-2006
blowtorch
Registered User
2,351,
6
Join Date: Dec 2004
Last Activity: 18 February 2020, 9:52 AM EST
Location: UK
Posts: 2,351
Thanks Given: 0
Thanked 6 Times in 6 Posts
Where is this -d being used? Is it for a particular command? If so, then check the man page for that command.
blowtorch
View Public Profile for blowtorch
Find all posts by blowtorch
#
4
03-29-2006
debasis.mishra
Registered User
23,
0
Join Date: Mar 2006
Last Activity: 3 March 2011, 4:53 PM EST
Posts: 23
Thanks Given: 0
Thanked 0 Times in 0 Posts
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
debasis.mishra
View Public Profile for debasis.mishra
Find all posts by debasis.mishra
#
5
03-29-2006
vino
Registered User
2,848,
14
Join Date: Feb 2005
Last Activity: 10 August 2018, 5:24 AM EDT
Location: Sydney, Down Under
Posts: 2,848
Thanks Given: 0
Thanked 14 Times in 14 Posts
As I said ealier, look into
man test
to see the description about
-d
vino
View Public Profile for vino
Find all posts by vino
#
6
03-29-2006
debasis.mishra
Registered User
23,
0
Join Date: Mar 2006
Last Activity: 3 March 2011, 4:53 PM EST
Posts: 23
Thanks Given: 0
Thanked 0 Times in 0 Posts
i got the solution.thanks
debasis.mishra
View Public Profile for debasis.mishra
Find all posts by debasis.mishra
#
7
03-29-2006
debasis.mishra
Registered User
23,
0
Join Date: Mar 2006
Last Activity: 3 March 2011, 4:53 PM EST
Posts: 23
Thanks Given: 0
Thanked 0 Times in 0 Posts
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?
debasis.mishra
View Public Profile for debasis.mishra
Find all posts by debasis.mishra
Page 1 of 2
1
2
>
Login or Register to Ask a Question
Previous Thread
|
Next Thread
Login or Register to Ask a Question
Member Badges and Information Modal
×