suppress the warning when mkdir an existing dir
2010-08-03 15:14:50 GMT
I am writing a script that puts files into a remote directory, also create that directory
if it does not exist in the remote host. Is there a way to have mkdir not emit the
warning when the dir already exists? Currently it complains:
mkdir: Access failed: Failure (test44) # test44 is the directory name
There is no harm done to remote host, but the message is a bit confusing
for my user to see - they think something is wrong, where it is really OK. So I want to suppress the message.
Alternatively, is there lftp commands to do this:
if [ ! -d "$dir" ]; then
mkdir $dir
fi
Thanks!
Jun
RSS Feed