Thursday, June 30, 2016

Remove the contents of a folder in linux

  1. To remove the folder with all its contents(including all interior folders): rm -rf /path/to/directory.
  2. To remove all the contents of the folder(including all interior folders) but not the folder itself: rm -rf /path/to/directory/*

No comments:

Post a Comment