asrman
For life, for speech-related research
Sunday, October 29, 2017
Bash Shell - Test if File or Directory Exists – TecAdmin
Bash Shell - Test if File or Directory Exists – TecAdmin
: "Bash Shell – Test if File or Directory Exists"
For File:
1
[
!
-
f
/
tmp
/
testfile
.log
]
&&
touch
/
tmp
/
testfile
.log
For Directory:
1
[
!
-
d
/
tmp
/
mydir
]
&&
mkdir
-
p
/
tmp
/
mydir
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment