View Single Post

  #2 (permalink)  
Old 10-25-2007, 02:44 PM
nixcraft's Avatar
nixcraft nixcraft is offline
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,101
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

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 {} \;
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote