[CentOS] A Directory/Subdirectories Disappeared - which logfile to look for this kind of information?

James Hogarth james.hogarth at gmail.com
Fri May 14 16:23:18 UTC 2010


On 14 May 2010 16:59, Tony Schreiner <schreian at bc.edu> wrote:
> please bottom post, more at the bottom ...
>
> On May 14, 2010, at 11:50 AM, Wang, Mary Y wrote:
>
>> Thanks for the info.  There are only three of us who have the "root"
>> access and I guess the date/time is more important to us.  We are
>> also concerned that there might be a script did the "rmdir"
>> unintentionally.

If you have scripts deleting/moving or otherwise playing around with
the filesystems you might want to double check they are null safe for
variables that end up filenames...

example:

#!/bin/bash
MYFILE=$1
scp ${MYFILE} me at backup:
rm -fr ./${MYFILE}

Very basic but illustrates the point.... if the bash argument (in this
case) was invalid or missed out somehow the result could be the
removal of the entire PWD. This only gets worse with absolute paths
(oops bye bye /) and more complicated setups... when quickly scripting
it is also something that often gets overlooked....

James



More information about the CentOS mailing list