use find to delete whole folder and files

You don't need a script...try something as follows to list files
Code:
find . -type f -exec ls -l {} \;
To delete only files (be careful command will delete all files from current directory):
Code:
find . -type f -exec /bin/rm -f {} \;
You can also specify path
Code:
find /path/to/delete -type f -exec /bin/rm -f {} \;

Comments

Popular Posts