Help - Search - Members - Calendar
Full Version: Need help with rm command
Linuxhelp > In The Community > General Discussion
Jayson
Hello,

Just started using Red Hat Linux at work for our Magma 5 program and once a month we archive our files.

This usually takes me 3 to 5 hours going through each directory and putting files on a disc to burn them,

My question is.

Is there anyway to use rm command to delete the files not needed when we do our backups so I'm not having to go through each directory and manually delete the files before moving the directory onto a disk to burn?

I tried something like this

find * -maxdepth 0 -name 'ProjectDB' -name '*.dbs' -name '*.db' -name '*.geo' -name 'stl\ files' -prune -o -exec rm -rf '{}' ';'

but as you can guess it's deleting everything in the directory even the files and folders I want to keep.

Thanks for you help.
michaelk
This might help
http://www.cyberciti.biz/faq/linux-unix-ho...d-remove-files/
VeTRooTJef
Rather useful message
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.