Sponsored Content
Full Discussion: rm substitute with blacklist
Top Forums UNIX for Dummies Questions & Answers rm substitute with blacklist Post 302149456 by broli on Thursday 6th of December 2007 07:13:31 AM
Old 12-06-2007
Quote:
Originally Posted by jim mcnamara
What you want to do is to run a shell script in place of the rm exectuable.
Your shell script runs the real rm, but prevents certain actions. Is this right?

Ways to do this:
1. create an alias for rm like alias rm="/path/to/mymscript" in /etc/profile
2. or rename /usr/bin/rm to /usr/bin/realrm and then make /user/bin/rm a link to your script
you got it right, but i was hoping that the someone already wrote that script, thats the point of my post, to find such a script, to avoid having to do it myself :P
 

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
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/ksh93, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/ksh93, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh, and /usr/sfw/bin/zsh. /etc/shells overrides the default list. Invalid shells in /etc/shells could cause unexpected behavior, such as being unable to log in by way of ftp(1). FILES
/etc/shells list of shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.11 20 Nov 2007 shells(4)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy