remove directory linux
rm -rf /path/to/directory
# 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
rm -f /path/to/directory/{*,.*}
rm -rf /path/to/directory/*
rm -r pathrm -R directory
Also in Shell:
- Title
- clipboard in ubuntu
- Category
- Shell
- Title
- linux make executable
- Category
- Shell
- Title
- how to check swap memory in linux
- Category
- Shell
- Title
- ignore git ignore
- Category
- Shell
- Title
- install postfix dovecot ubuntu 16.04
- Category
- Shell
- Title
- linux check disk space
- Category
- Shell
- Title
- how to disconnect local repo from remote master
- Category
- Shell
- Title
- git remove branch
- Category
- Shell
- Title
- composer autoload dump
- Category
- Shell
- Title
- copy folders linux
- Category
- Shell
- Title
- mac brew: command not found
- Category
- Shell
- Title
- view permissions linux
- Category
- Shell
- Title
- linux unzip with password
- Category
- Shell
- Title
- find text in any file linux
- Category
- Shell
- Title
- foreach loop powershell
- Category
- Shell
- Title
- edit branch name git
- Category
- Shell
- Title
- how to add extension to all files terminal
- Category
- Shell
- Title
- delete a file in cmd windows
- Category
- Shell
- Title
- git how to delete origin branch
- Category
- Shell
- Title
- install putty on ubuntu
- Category
- Shell
- Title
- react native install
- Category
- Shell
- Title
- how to convert a multy digit array into a whole number
- Category
- Shell
- Title
- git push existing code to new repository
- Category
- Shell
- Title
- push code to github command line
- Category
- Shell