How to Check whether directory exists using shell script
Moderator: Staff
How to Check whether directory exists using shell script
How to Check whether directory exists using shell script
cPanel Server Management
@ 30$ Onwards
@ 30$ Onwards
Re: How to Check whether directory exists using shell script
dir=cache
if [ -d "$dir" ]; then
echo "$dir directory exist on the server"
fi
======================
OR
#!/bin/bash
if [ -d ~/directoryname]
then
echo "directory exists"
------------------------------
Martin N
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree
if [ -d "$dir" ]; then
echo "$dir directory exist on the server"
fi
======================
OR
#!/bin/bash
if [ -d ~/directoryname]
then
echo "directory exists"
------------------------------
Martin N
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree