How to check the directory is present in shell script or not

0 votes
Can anyone suggest which command can be use to check the directory is present in shell script or not?
Jun 25, 2019 in Big Data Hadoop by Mugdha
682 views

1 answer to this question.

0 votes

Hi,

To check the directory is present in the shell script, you can use the following solution below:

if [ -d "$DIRECTORY" ]; then
# Control will enter here if $DIRECTORY exists.
fi

I hope it will work.

answered Jun 25, 2019 by Gitika
• 65,770 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to write examples to test whether the installation is validated or not?

You have some example jars in your ...READ MORE

answered Sep 5, 2018 in Big Data Hadoop by Frankie
• 9,830 points
733 views
0 votes
11 answers
0 votes
1 answer

How can I use my host machine’s web browser to check my HDFS services running in the VM?

The sole purpose of the virtual machine ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,450 views
0 votes
1 answer

What is grunt shell in pig?

Hey, Grunt shell is a shell command.The Grunts ...READ MORE

answered May 6, 2019 in Big Data Hadoop by Gitika
• 65,770 points
5,533 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,053 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,959 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,624 views
0 votes
1 answer
0 votes
2 answers

How to see MySql service is running or not using linux command?

Hi, You can simply run the following commands ...READ MORE

answered Jan 21, 2020 in Big Data Hadoop by anonymous
2,275 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP