Linux – Delete all files and folders in a folder recursively
Linux command that will delete all files & folders in a certain directory:
for current path
- cd to directory
- rm -Rf *
or for absolute path:
- rm -Rf /home/some/directory/*
another option (this will only delete files of type f which is a regular file):
- find /some/path/ -type f -exec rm -f ‘{}’ \;
If you are trying to delete too many files in a directory at the same time read here: /bin/rm Argument list too long – Linux
Categories: Bookmarks, Linux, Tech delete folder, exec, exec linux, find linux, Linux, ommand, rm linux








