bash remove directory
Shell
rm -rf directory-name# To delete a single file, use the rm or unlink command followed by the file name:
unlink filename
rm filename
# To delete multiple files at once, use the rm command followed by the file names separated by space.
rm filename1 filename2 filename3
# To remove an empty directory, use either rmdir or rm -d followed by the directory name:
rm -d dirname
rmdir dirname
# To remove non-empty directories and all the files within them, use the rm command with the-r (recursive) option:
rm -r dirname
# To remove non-empty directories and all the files without being prompted, use rm with the -r (recursive) and -f options:
rm -rf dirname
#To remove multiple directories at once, use the rm -r command followed by the directory names separated by space.
rm -r dirname1 dirname2 dirname3
# EXAMPLE
rm -r YourFolderName
# SYNTAX
# rm [option(s)-if-any] <folder(s)-to-remove-including-contents>
# +---------+------------------------------------------------------------------+
# | OPTIONS | DESCRIPTION |
# +---------+------------------------------------------------------------------+
# | -f | Force: ignore nonexistent files, never prompt |
# | -i | Interactive: prompt before every removal |
# | -I | Interactive: only prompt before removing more than three files |
# | -r | Recursive: remove directories and their contents recursively |
# | -v | Verbose: explain what is being done |
# +---------+------------------------------------------------------------------+
Also in Shell:
- Title
- bash tee stdout and stderr
- Category
- Shell
- Title
- git remove remote file keep local
- Category
- Shell
- Title
- remove .svn recursively linux
- Category
- Shell
- Title
- remove remote git
- Category
- Shell
- Title
- install pip ubuntu
- Category
- Shell
- Title
- batch rename files
- Category
- Shell
- Title
- how to find the path of a command in linux
- Category
- Shell
- Title
- git rebase
- Category
- Shell
- Title
- git unstage file for commit
- Category
- Shell
- Title
- Could not install Visual Studio Build Tools.
- Category
- Shell
- Title
- fatal: unable to access Could not resolve host wsl
- Category
- Shell
- Title
- installing rspec gemfile
- Category
- Shell
- Title
- list config git
- Category
- Shell
- Title
- git commit expanded message
- Category
- Shell
- Title
- grep literal string
- Category
- Shell
- Title
- oh my zsh
- Category
- Shell
- Title
- .gitignore not working
- Category
- Shell
- Title
- install AdminLTE
- Category
- Shell
- Title
- git list remote branches
- Category
- Shell
- Title
- kill process on port windows
- Category
- Shell
- Title
- xcode clean derived data command line
- Category
- Shell
- Title
- sound output raspberry pi
- Category
- Shell
- Title
- how to install jupyter notebook in windows 10
- Category
- Shell
- Title
- install bootstrap in laravel
- Category
- Shell
- Title
- check disk space linux
- Category
- Shell
- Title
- bash: zipalign: command not found
- Category
- Shell
- Title
- how to delete a non empty directory in linux
- Category
- Shell
- Title
- git authentication failed
- Category
- Shell
- Title
- installing react router dom with yarn
- Category
- Shell
- Title
- linux create file
- Category
- Shell
- Title
- git SSL certificate problem: certificate has expired
- Category
- Shell
- Title
- download images from url terminal
- Category
- Shell
- Title
- linux os upgrade
- Category
- Shell
- Title
- git flow release
- Category
- Shell
- Title
- git cherry pick commit
- Category
- Shell
- Title
- uninstall cinnamon
- Category
- Shell
- Title
- testing cors
- Category
- Shell
- Title
- combine strings bash
- Category
- Shell
- Title
- how to save environment variables ubuntu
- Category
- Shell
- Title
- install imblearn
- Category
- Shell
- Title
- ngb-tabset install
- Category
- Shell
- Title
- install wireguard
- Category
- Shell
- Title
- ubuntu 16.04 bluetooth not detecting devices
- Category
- Shell
- Title
- ubuntu unzip zip
- Category
- Shell
- Title
- install node js ubuntu
- Category
- Shell
- Title
- kill port ubuntu
- Category
- Shell
- Title
- How do I show the changes which have been staged
- Category
- Shell
- Title
- git bash anaconda
- Category
- Shell
- Title
- powershell create symlink
- Category
- Shell
- Title
- pod install ruby: bad interpreter: No such file or directory
- Category
- Shell
- Title
- ubuntu install opencl
- Category
- Shell
- Title
- ubuntu ec2 node mongodb connect ECONNREFUSED 127.0.0.1:27017
- Category
- Shell
- Title
- bash create file
- Category
- Shell
- Title
- bash call another script relative to current script
- Category
- Shell
- Title
- rec: command not found
- Category
- Shell
- Title
- linux df -h levels occupy
- Category
- Shell
- Title
- reset branch on local git
- Category
- Shell
- Title
- obs
- Category
- Shell
- Title
- install tensorflow
- Category
- Shell
- Title
- linux check timezone
- Category
- Shell
- Title
- conda install keras
- Category
- Shell
- Title
- kill app at port
- Category
- Shell
- Title
- how to undo makemigrations django
- Category
- Shell
- Title
- install pipenv in ubuntu
- Category
- Shell
- Title
- chown
- Category
- Shell
- Title
- asdf node fingerprint
- Category
- Shell
- Title
- linux red hat version
- Category
- Shell
- Title
- git reset hard
- Category
- Shell
- Title
- apache ubuntu Generate CSR stack overflow
- Category
- Shell
- Title
- npm install --global vue-cli
- Category
- Shell
- Title
- remove a file from git commit
- Category
- Shell
- Title
- create directory linux
- Category
- Shell
- Title
- how to disconnect local repo from remote master
- Category
- Shell
- Title
- vuetify install
- Category
- Shell
- Title
- linux remove folder and all his content
- Category
- Shell
- Title
- react quill
- Category
- Shell
- Title
- space in dock mac
- Category
- Shell
- Title
- beautifulsoup4 install
- Category
- Shell
- Title
- git delete tag name
- Category
- Shell
- Title
- how to find a file in linux terminal
- Category
- Shell
- Title
- BDD framework in testcomplete github
- Category
- Shell
- Title
- ubuntu storage check
- Category
- Shell
- Title
- how to install gatsby transformer plugin
- Category
- Shell
- Title
- heic open linux
- Category
- Shell
- Title
- install openjdk 8 sdk on ubuntu
- Category
- Shell
- Title
- how to create a new group in linux
- Category
- Shell
- Title
- conda install paraview
- Category
- Shell
- Title
- run mysql xampp shell
- Category
- Shell
- Title
- bash remove random files from directory
- Category
- Shell
- Title
- crop video from specific time to specific time ffmpeg
- Category
- Shell
- Title
- linux install nvm
- Category
- Shell
- Title
- install boostrap react
- Category
- Shell
- Title
- scp download file
- Category
- Shell
- Title
- bash measure execution time
- Category
- Shell
- Title
- how to push in git command line
- Category
- Shell
- Title
- create a zip file in linux
- Category
- Shell
- Title
- how to zip a file in linux
- Category
- Shell
- Title
- Failed at the [email protected] postinstall script.
- Category
- Shell
- Title
- get full path of files in directory linux command
- Category
- Shell
- Title
- bash send to dev null
- Category
- Shell