linux remove folder and all his content
Code Example - linux remove folder and all his content
rm -rf /path/to/directory
linux delete content of folder
//Deletes the folder including all its content
rm -r /path/to/directory/*
bash remove directory
rm -rf directory-name
remove directory from linux
rm -r filename
rm -rf filename
this command remove the directory and subdirectory forecefully
remove directory linux
rm -rf /path/to/directory/*
Delete Directory
//delete directory
string deleteDirectoryPath = @"C:\Users\Yogeshkumar Hadiya\Desktop\DirectoryHandling";
if (Directory.Exists(deleteDirectoryPath))
{
Directory.Delete(deleteDirectoryPath);
Console.WriteLine("Directory deleted at " + createDirectoryPath);
}
else
{
Console.WriteLine("Directory not found at " + createDirectoryPath);
}