bash - In Unix, how do you remove everything in the current directory and below it? -


I know that it will delete everything in a subdirectory and under it:

  Rm -rf & lt; Subdir-name & gt;  

But how can you remove the contents of the current directory as well as the contents of all subdirectories below each subdirectory? Practice safe computing: Just go up one level in the hierarchy and do not use wildcard expressions:

  cd ..; RM-RF - & lt; Dir-to-remove & gt;  

Specify two dash - rm that & lt; Dir-to-remove & gt; Not a command-line option, even if it starts with a dash.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -