Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ajt (2546)

  (email not shown publicly)

UK based. Perl, XML/HTTP, SAP, Debian hacker.

  • PerlMonks: ajt []
  • Local LUG: AdamTrickett []
  • Debian Administration: ajt []
  • LinkedIn: drajt []

Journal of ajt (2546)

Tuesday June 17, 2003
10:46 AM


[ #12901 ]

I just deleted some Perl scripts I was working on. I should have them back tomorrow from tape, but I'm not happy with myself. On almost every nix system I've ever used, rm has been aliased to rm -i, but not on this one, though it is now. Even if I blame it on my hay fever and nasty headache, I feel a right plonker at the moment.....

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by drhyde (1683) on 2003.06.17 11:09 (#21147) Homepage Journal
    ... when you get used to it, this badness happens, or you get used to blindly saying yes and deleting stuff anyway because it almost never asks to delete stuff you didn't want to delete in the first place. And anyway - what no CVS? :-)
    • I can see the argument in this, indeed, you could say that's why I screwed up. Thankfully it's not serious, and the files are backed up, but it was annoying....

      CVS, that something that we hope to implement soon....

      -- "It's not magic, it's work..."
  • backups (Score:3, Insightful)

    by inkdroid (3294) on 2003.06.17 12:17 (#21152) Homepage Journal
    You are in good company. I'm down at YAPC, and heard Damian talk yesterday about how he deleted *ALL* of his slides minutes before he was to start his talk on everyday perl. He took the time to point out to everyone, that it's absolutely essential to have your talk backed up (he had a CD backup). Of course backups only work when you do them :)
    • Re:backups (Score:4, Insightful)

      by ajt (2546) on 2003.06.17 14:27 (#21162) Homepage Journal

      When I was doing my PhD, I saw many people suffer horribly at the hands of lost files, and the University showed no mercy. As a result I was paranoid, and had back-ups on different PCs, different Unix servers, and on floppy disks all over the country. As you would expect I had no problems at all, but I've taken a reasonable attitude ever since.

      Over the years I've had NT die a few times, and take the NTFS partition with it, so I've always kept data spread over multiple partitions, and I make regular backups to CD-R.

      In this case it was some scripts to do a process once, that I was re-using, and instead of deleting the log files, I deleted the scripts. I'll survive - though I did feel very stupid.

      -- "It's not magic, it's work..."
  • Me too (Score:3, Interesting)

    by runrig (3385) <> on 2003.06.17 14:02 (#21157) Journal
    After experiencing that myself (and having to wait hours for the backup to unload, but being glad there was a backup), I wrote an alias for rm [] which I haven't yet been sorry about.
    • Re:Me too (Score:3, Interesting)

      I was thinking about this on the way home, it can't be that hard to make rm do backing up on the fly. But as drhyde [] pointed out above, it could lull one into a false sense of security, and one could still come unstuck!

      I suppose I'll just have to bite the bullet and actually use CVS properly.

      -- "It's not magic, it's work..."
      • With 'rm -i' you get into the habit of just saying yes, but with an 'rm' that backs up, it just happens all the time. And even with CVS, I could see losing a days worth of work with 'rm *.somthing' and accidentally putting a space between the '*' and the '.'

        I wasn't sure myself if I'd like my rm alias, but so far it's been fine for me.

  • Recently, I tried to create a local CPAN config, and after typing 3 times the /home/book/.cpan/ string in the config file (which is a Perl script), I decided to be clever and type $HOME = '/home/book/.cpan/' at the beginning of that script.

    The mistake was to set the values as '$HOME/foo' (note the single quotes). Friendly as ever, was very happy to create a directory named $HOME in my home directory. So my next move was to type rm -rf $HOME. I mean, that's exactly what I wanted to do... not.

    Thanks for the backups. Very much.

    • Very bad.... A little bit more drastic than my cock-up. As I read somewhere recently "a flamingo-up" like a cock-up only bigger and pink.

      Yes, I know "cock-up" is not a reference to the anmimal or body parts, but it sounds good when things go wrong....

      -- "It's not magic, it's work..."
  • Well at least you have a backup :-) At least you didn't remove a program that hadn't been backed up yet.

    Yep I did that a couple of years ago. I'd been working on a prog for about 3-4 hours and had some test files in the same directory as the prog. I'd finished working on the code for the day and figured I should remove the test files as I didn't need them anymore. My test files were all named termYYYYMMDD so I just did a quick rm te*. The problem? My program was called So seeing as I had
    • I don't have the luxury of CVS (yet), so it was a good job I'd just started, but I do have tape backup, so in my case not a dissaster, however, things will have to change, as it could have been very bad!

      -- "It's not magic, it's work..."
    • But that's OK, you were planning to throw the first version away anyway, right? :-)