Re: Creating a bogus directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2004-01-21 at 14:34, dalen wrote:

> Mike,
>     I would delete the mkdir lines as they only need to be run once, 
> while the rsync lines need to run often.  If you run mkdir twice it 
> gives a similar error... 
> 
> [root@viewlib root]# mkdir /root/m
> [root@viewlib root]# mkdir /root/m
> mkdir: cannot create directory `/root/m': File exists
> [root@viewlib root]#
> 
> You could also wrap a mkdir command in some "if dir doesn't exist" code.

"mkdir -p" will work well here - creates parent directories if they
don't exist, no error if they do.

Cheers, Ben





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux