How Remove All Files in a Directory Linux?
Contents How Do I Remove All Files from a Directory in Linux? Linux Delete All Files in Directory Open the Terminal Application. to Delete Everything in a...
Contents
How do I remove all files from a directory in Linux?
Linux Delete All Files In Directory
- Open the terminal application.
- To delete everything in a directory run: rm /path/to/dir/*
- To remove all sub-directories and files: rm -r /path/to/dir/*
23 июл. 2020 г.
Must Read
How do I remove all files from a directory in Unix?
To remove a directory and all its contents, including any subdirectories and files, use the rm command with the recursive option, -r . Directories that are removed with the rmdir command cannot be recovered, nor can directories and their contents removed with the rm -r command.