Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

LINUX TEST FOLDER EXITS

You can use test -d (see man test).

-d file True if file exists and is a directory.

For example:

test -d "/etc" && echo Exists || echo Does not exist
Comment

PREVIOUS NEXT
Code Example
Shell :: git push asking for username after setting up ssh key 
Shell :: failed to start openbsd secure shell server 
Shell :: kill k3s 
Shell :: pipenv install virtual at same path 
Shell :: install tmux2 
Shell :: how to set up git user 
Shell :: bash upgrade cmake (From Source) 
Shell :: How to Change Your MySQL/phpmyadmin Password in XAMPP 
Shell :: linux get ownership of own user directory folder ubuntu chown operation not permitted 
Shell :: install ruby on ubuntu 
Shell :: pip not installing packages 
Shell :: convert ppk to pem 
Shell :: leaflet install yarn 
Shell :: remove all branches deleted on remote 
Shell :: check disk space folders linux 
Shell :: how to create new repository in github 
Shell :: find exclude 
Shell :: create git repository pycharm 
Shell :: read string by string in file in linux 
Shell :: git clone from specific branch command 
Shell :: delete directory from cmd 
Shell :: bash: conda: command not found 
Shell :: git how to roll back to a commit 
Shell :: undo git commit and keep changes 
Shell :: install paddlepaddle 
Shell :: sshd: no hostkeys available -- exiting. 
Shell :: ubuntu browser download manager 
Shell :: install android studio 
Shell :: keytool export a certificate 
Shell :: yarn react install 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =