Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
Post Can we use exclude option in"rm" command to exclude some files/folders?


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, 10:14 AM   #2
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

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


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 03:01 PM
CVS Exclude : Exclude sub directories from check out On Linux from command line shajay12 Linux - Newbie 1 08-03-2009 12:36 AM
Subversion: exclude certain files or folders Ephracis Linux - Software 1 03-01-2008 03:58 PM
Does "rm" command has a option "--exclude"? jimmyjiang Red Hat 5 02-22-2008 01:59 PM
"latest threads" - exclude option ??? syg00 LQ Suggestions & Feedback 2 01-01-2008 08:11 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 PM.

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