Linux Commands
Commands
ls
cd
mkdir
cat
more
head
tail
touch
rm
How To
Change Prompt

rm - command in linux



rm - command in linux

rm command removes the given file., with -r option it will remove the directories

syntax

rm [options] [filenames|directories]

example

 //below command removes the file(s) 
 rm myfile.txt

 rm myfile1.txt myfile2.txt

 //below command removes the directories
 rm -r mydir

 rm -r mydir2 mydir3

force remove

 //below command force removes the file 
 rm -f myfile.txt

 //below command force removes the directories
 rm -rf mydir

options


OptionDescription
-f, --forceforce removes files, will not prompt if file not exists
-iprompt user when removing file(s)
-Iprompt user when removing a set of 3 files
--interactive[=WHEN]prompt user based on WHEN parameter
--one-file-system
--no-preserve-root
--preserve-root
-r, -R, --recursiveremove directories and their contents recursively
-v, --verboseexplain what is being done
--helpdisplays help info of rm command
--versiondisplays version info of rm command


rm

rm command in linux

posted on 2019-10-24 21:34:18 - Linux Commands Tutorials


touch

touch command in linux

posted on 2019-10-23 19:41:20 - Linux Commands Tutorials


tail

tail command in linux

posted on 2019-10-23 19:10:42 - Linux Commands Tutorials


Prompt Examples

ChatGPT Prompt Examples

posted on 2023-06-21 22:37:19 - ChatGPT Tutorials


Use Cases

Chat GPT Key Use Cases

posted on 2023-06-21 21:03:17 - ChatGPT Tutorials


Prompt Frameworks

Prompt Frameworks

posted on 2023-06-21 19:33:06 - ChatGPT Tutorials