Sponsored Content
Full Discussion: rm substitute with blacklist
Top Forums UNIX for Dummies Questions & Answers rm substitute with blacklist Post 302149308 by broli on Wednesday 5th of December 2007 03:08:09 PM
Old 12-05-2007
rm substitute with blacklist

hi!
first i want to apologize for two things. my English and (possible) posting in the wrong sub forum (i couldn't find one that fits my question)

I am needing a script that can substitute rm.
the idea is that the operator can/must delete some folders and files from time to time, when the free space on some hard drive is running low, but some other files shouldn't be touched, and you know murphy
i can write a script to do that, but i was hoping someone already did
what i can think is a while loop that reads the blacklist file line by line, and if the %1 equals some line, then echo some msg and stop
but is more complex, i need logs, i have to match full path and, basename of the full path against, the first param. i need to be able to detect errors on the input, and avoid "rm -rf /" hells derived from coding errors

to be clear, i don't want you to make this script (if it has to be done, i will do it, and you will read me in the scripting section asking some specific problems), again, i was hoping some one already invented this wheel

About the interpreter/unix flavour it doesnt matter, if you know one that works on bash/ksh/zsh/csh/.* in SunOS/Linux/AIX/SCO/BSD/.* i will be more than grateful Smilie
 

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Multipath devnode blacklist

hi all, there´s one thing i dont understand ... in the file /etc/multipath.conf, why do we incluide "dm-" ??? a device mapper dm- is not supposed to be a multipath part that will be used after configuring mutipath dm?? devnode_blacklist { devnode... (0 Replies)
Discussion started by: pabloli150
0 Replies

2. UNIX for Beginners Questions & Answers

Email alert when client in blacklist joins network

I have a textfile with a list of strings I want to monitor in my network. alertlist: hans franz tanzSo it can output for me whenever the a strings it matched: #!/bin/sh while : ; do testfile="/var/media/ftp/alertlist.txt" ] && echo "${testfile##*/} exists." || echo "${testfile##*/}... (9 Replies)
Discussion started by: lowmaster
9 Replies
MRTG-FORUM(1)							       mrtg							     MRTG-FORUM(1)

NAME
mrtg-forum - Interactive Help for MRTG users SYNOPSIS
There is a lot of written documentation for mrtg, but nevertheless you may have a problem where you can't find the solution. In this case some Human Help may be necessary. With MRTG there are several ways to get Humans to help you. MAILING-LIST There are three mailing lists for MRTG available. mrtg for discussion among mrtg users. mrtg-announce for announcements regarding new versions of mrtg related software. mrtg-developers for discussion among people who write software in connection with mrtg or who hack mrtg itself. THE RULES Please note that the memebers of the mrtg mailinglist value politeness highly. This means behave in a way you would like others to behave towards you. o No shouting. (NO CAPS) o No rude language o No demands. everybody is on the list out of their own free will. If you do not get an answer to your question, chances are high that you did not give sufficent details about the nature of your problem or that the answer to your problem is in the documentation. o If you do not follow the rules you will be unsubscribed from the list with no further questions asked. o Decisions about your unsubscription from the list will be taken by Alex van den Bogaerdt <alex at ergens.op.het.net> Paul C. Williamson <pwilliamson at MANDTBANK.COM> If you feel that you have been treated unfairly, you may send mail to me and explain the situation. Tobi Oetiker <tobi@oetiker.ch> SUBSCRIBING These lists are managed by a mailing-list management program (listar). It allows you to subscribe to these lists by sending a message with the subject: subscribe to the following address: listname-request@lists.oetiker.ch You will then get a message asking you to confirm your subscription. For posting to the lists use the following address listname@lists.oetiker.ch Note that only people who are subscribed to the list can post. Further information about the usage of the mailing lists is available by sending a message with the subject line help to either one of the request addresses. There is also a webinterface to the lists on http://lists.oetiker.ch List archives are on http://www.mail-archive.com/index.php?hunt=mrtg and http://gmane.org/find.php?list=mrtg NEWSGROUP
For discussion of MRTG or related topics on the Usenet, please send your posts to: news:comp.dcom.net-management Many MRTG users are in this forum and will help you. You can also find an archive of past activity from this Newsgroup on: http://groups.google.com/group/comp.dcom.net-management IRC Channel For discussion of MRTG and related topics on IRC, the `#mrtg' channel on EFNet has been created. More information can be found at http://mrtg.easymac.org MRTG Japan There is a special Mailinglist for MRTG Users in Japan. It carries translations of the traffic from MRTG-ANNOUNCE as well as updates on the Japanese Translation of the MRTG documentation. Go to http://www.mrtg.jp/ for further Information. AUTHOR
Tobias Oetiker <tobi@oetiker.ch> and many contributors 2.17.4 2012-01-12 MRTG-FORUM(1)
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy