Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux remove folder and all his content

rm -rf /path/to/directory
Comment

linux remove folder and all his content

rm -rf /path/to/directory/*
Comment

linux remove directory and contents

# 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                            |
# +---------+------------------------------------------------------------------+
Comment

remove folder and contents linux

# Remove Single File Using rm:
rm file1.txt
# Remove Directory and it's contents:
rm -r dir1 			# '-r' is short for '-recursive' 
# Remove empty Directory:
rm -d dir1 			# '-d' is short for '-dir'
Comment

remove directory and contents linux

rm -r path
Comment

linux remove folder and all his content

rm -rf /path/to/directory/{*,.*}
Comment

linux delete content of folder

//Deletes the folder including all its content
rm -r /path/to/directory/*
Comment

PREVIOUS NEXT
Code Example
Shell :: how to install heroku cli 
Shell :: lower brightness of a ubunut pc 
Shell :: windows edit file cmdf 
Shell :: check my privilages ubuntu 
Shell :: how to reset all github credentials 
Shell :: React Hooks Form Installation 
Shell :: tkcalendar install 
Shell :: git clone using ssh key from gitlab 
Shell :: symfony install doctrine 
Shell :: how to logout in linux kali 
Shell :: install apache2 linux 
Shell :: linux decode base64 string 
Shell :: git get commit author 
Shell :: docker install ubuntu 20 
Shell :: how to uninstall unity termanl command 
Shell :: how to uninstall sticky notes in ubuntu 
Shell :: install scrollmagic npm 
Shell :: head of zipped file 
Shell :: shell script or condition 
Shell :: install composer by cmd 
Shell :: what is difference between npm install and npm install save --dev 
Shell :: install prettier npm 
Shell :: stop git from tracking a folder 
Shell :: appimage install kali linux 
Shell :: Count files and directories using shell script 
Shell :: find the size of file in linux 
Shell :: install elasticsearch 
Shell :: or in matlab 
Shell :: get additional parameters linux scripting 
Shell :: bash remove first character from string 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =