[PLUG] how to adjust for special characters in mkdir() function?

Galen Seitz galens at seitzassoc.com
Sat Oct 2 05:34:18 UTC 2010


logical american wrote:
> Ironically mkdir -p does create a full path directory with multiple 
> slashes, I am using it right now in a shell script program.  But 
> apparently mkdir() won't

As Daniel says, mkdir(2) only creates a single directory at a time. 
mkdir(2) is little more than a wrapper around the mkdir system call.
To see what a command like mkdir -p does, try something like this:

strace mkdir -p /tmp/a/b/c


-- 
Galen Seitz
galens at seitzassoc.com



More information about the PLUG mailing list