Next privilege 50 Rep.
Next badge 0/1
0 people reached
- 0 posts edited
- 0 helpful flags
- 0 votes cast
How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash?
Actually it's not any more or any less dangerous than what you suggest. All the && does is to chain the two commands together so that they execute at the same time. If anything my method is actually SAFER since you have to stop and .look before you execute the rm -rf *. Pausing to double check is always better.
|How to remove all files and subdirectories in a directory WITHOUT deleting the directory in bash?|
|Why is Firefox on Ubuntu choppier than Firefox on Windows?|