LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can we use exclude option in"rm" command to exclude some files/folders? (https://www.linuxquestions.org/questions/linux-newbie-8/can-we-use-exclude-option-in-rm-command-to-exclude-some-files-folders-786686/)

yadav_rk727 02-03-2010 09:34 AM

Can we use exclude option in"rm" command to exclude some files/folders?
 
Hi,

i have created on folder in my server to upload some regular states. I want that user can modify or upload already stored files. but, should not upload any unwanted files or folders. for that i want to use "rm" command as auto scheduler (putting this in cron tab. so that all files will be removed except some required files / folders for which this upload facility is activated. users are using secure-shell for uploading data.

catkin 02-03-2010 10:14 AM

The rm command's man page does not describe any such option. You could script the task, using a list of "authorised" files-and-directories and deleting any files-and-directories which are not on the list.


All times are GMT -5. The time now is 07:06 AM.