LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 02-03-2010, 10:34 AM   #1
yadav_rk727
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Post 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.
 
Old 02-03-2010, 11:14 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
readdir() gives "." and ".." and doesn't exclude some folders Tordne Programming 12 08-13-2009 04:01 PM
CVS Exclude : Exclude sub directories from check out On Linux from command line shajay12 Linux - Newbie 1 08-03-2009 01:36 AM
Subversion: exclude certain files or folders Ephracis Linux - Software 1 03-01-2008 04:58 PM
Does "rm" command has a option "--exclude"? jimmyjiang Red Hat 5 02-22-2008 02:59 PM
"latest threads" - exclude option ??? syg00 LQ Suggestions & Feedback 2 01-01-2008 09:11 PM


All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration