mkdir -p myProject/{src,doc,tools,db}
bash linux repertoire
<iframe width="100%" height="200" src="http://snipet.teknotit.com/index.php?embed=5440a717e2f1f" type="text/html"></iframe>
Texte seul - Permalink - Snippet public posté le 17/10/2014
/*****
*@dir - Directory to destroy
*@virtual[optional]- whether a virtual directory
*/
function destroyDir($dir, $virtual = false)
{
$ds = DIRECTORY_SEPARATOR;
$dir = $virtual ? realpath($dir) : $dir;
$dir = substr($dir, -1) == $ds ? substr($dir, 0, -1) : $dir;
if (is_dir($dir) && $handle = opendir($dir))
{
while ($file = readdir($handle))
{
if ($file == '.' || $file == '..')
{
continue;
}
elseif (is_dir($dir.$ds.$file))
{
destroyDir($dir.$ds.$file);
}
else
{
unlink($dir.$ds.$file);
}
}
closedir($handle);
rmdir($dir);
return true;
}
else
{
return false;
}
}
fonctions php repertoire
<iframe width="100%" height="830" src="http://snipet.teknotit.com/index.php?embed=544098c4c60d1" type="text/html"></iframe>
Texte seul - Permalink - Snippet public posté le 17/10/2014
du -kh --max-depth=1 mon_repertoire/
bash linux repertoire taille
<iframe width="100%" height="200" src="http://snipet.teknotit.com/index.php?embed=544091183c11f" type="text/html"></iframe>
Texte seul - Permalink - Snippet public posté le 17/10/2014