Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

remove a directory

# To remove an Empty directory, Use
$ sudo rmdir folder-name

# If it is not a empty directory, then rm command can be used
$ sudo rm -rf folder-name
Comment

Deleting or removing a directory or folder

you can delete a folder using rmdir:
The folder you delete must be empty.



$ mkdir fruits
$ rmdir fruits



You can also delete multiple folders at once:


$ mkdir fruits cars
$ rmdir fruits cars



To delete folders with files in them, we'll use the more generic 'rm' command
which deletes files and folders, using the
-rf options:



$ rm -rf fruits cars



Be careful as this command does not ask for confirmation and it will
immediately remove anything you ask it to remove.
There is no bin when removing files from the command line, and recovering
lost files can be hard.
Comment

How to remove Directories with rm

rm -d directory
Comment

remove directory command line

Rmdir "C:myfolder"
Comment

Delete Directory

//delete directory
string deleteDirectoryPath = @"C:UsersYogeshkumar HadiyaDesktopDirectoryHandling";
if (Directory.Exists(deleteDirectoryPath))
{
    Directory.Delete(deleteDirectoryPath);
    Console.WriteLine("Directory deleted at " + createDirectoryPath);
}
else
{
    Console.WriteLine("Directory not found at " + createDirectoryPath);
}
Comment

PREVIOUS NEXT
Code Example
Shell :: mac zip with password 
Shell :: set up ssh windows 10 
Shell :: command to create or change a password for a user 
Shell :: create new branch from commit 
Shell :: what is pipe line command in linux? 
Shell :: how to install etcher on centos 7 
Shell :: scrcpy use on linux 
Shell :: linux generate file of size 
Shell :: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432 
Shell :: File "manage.py", line 17 ) from exc ^ SyntaxError: invalid syntax 
Shell :: PDF Acrobat ubunut 
Shell :: linux how to move file to another directory 
Shell :: sudo apt-get install libboost-all-dev 
Shell :: could not find tools.jar linux 
Shell :: how to install homebrew on mac 
Shell :: how to open .bin file in linux 
Shell :: video player ubuntu 
Shell :: tail -f linux last 100 lines 
Shell :: git push template 
Shell :: ubuntu send input to screen 
Shell :: silent install google chrome 
Shell :: merge child branch to parent git 
Shell :: windows terminal guid 
Shell :: install rclone FOR UBUNTU 
Shell :: uninstall all extensions vscode 
Shell :: bash find text in specific file 
Shell :: how to check default path of the nginx 
Shell :: execute powershell script from command line with parameters 
Shell :: git push to remote 
Shell :: fix kde root themes 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =