[Cialug] make install files

Matthew Nuzum newz at bearfruit.org
Wed Oct 29 12:14:54 CDT 2014


There are actually a couple variations of this mistake. I know of 2. :-)

The other one I know about is this: On a RH based system you might want to remove all the PHP packages, so you could run a command like this:

rpm -qa | grep -i php | xargs rpm -e

Funny things happen if you forget that `grep` bit in the middle. Let's just say that it takes a while for the command to finish. :-)

The rm -rf /var problem was more likely to happen in the days of old Slackware where packages were tarballs. In those cases, you had to use root to delete the files if you untarred it in your home directory (which was very easy to do). If you'd merely changed the prefix on ./configure then it is most likely that the make install would have used your own user's permissions and not needed root access to delete the files.
-- 
Matthew Nuzum
newz2000 on freenode, skype, linkedin and twitter


♫ You're never fully dressed without a smile! ♫

> On Oct 29, 2014, at 9:04 AM, Daniel A. Ramaley <daniel.ramaley at drake.edu> wrote:
> 
> On 2014-10-28 at 16:30:51 Matthew Nuzum wrote:
>> Just, uh, make sure that you don't type rm -rf /var when you meant to
>> type rm -rf ~/var. As root. FYI.
> 
> I suspect most users of Unix-like systems make a mistake of that 
> category once. Hopefully once is enough to teach the value of backups 
> and being careful. I made that mistake once on a production web server. 
> And then had an enjoyable evening of learning how to use a hex editor on 
> a filesystem, followed the next day by setting up automated backups.
> 
> A practice i've developed (especially when logged in as root) is when i 
> want to do an "rm -rf" to first do an "ls -d" with the same file 
> argument to confirm that i have the file correct, then edit the previous 
> command to swap ls -d with rm -rf.
> 
> __
> Daniel A. Ramaley  |  Network Engineer 2
> Drake Technology Services (DTS) | Drake University
> 
> T: +1 515 271-4540
> F: +1 515 271-1938
> E: daniel.ramaley at drake.edu
> 



More information about the Cialug mailing list