#1 Typo with nc can easily cause disaster


Here's something I manage to do every month or so:

nc foo * # No! I meant foo* !!

The result is hundreds of windows popping up with no way to stop it. If I'm lucky, my session won't crash or run out of memory.

The preferable solution is: if the number of files is more than 10 or 20, present a modal dialog that says "Opening file N of X..." that has a cancel button on it. Window manager interaction may make this tricky. If I ignore the dialog and let it go, then it goes away automatically after all are open. However, if I made the typo and it's trying to open 1000 files, I hit cancel.

A simpler (but more annoying) solution is if N is over the threshold, post a dialog: "Are you sure you want to load X files all at once?". Having a listbox to change it on the fly without retyping may be nice. A command line option may be needed to override this.


  • Steve LoBasso

    Steve LoBasso - 2001-02-09

    If we implement this, and I'm not saying we should, please make the threshold and X resource
    so it can be changed.

  • Scott Tringali

    Scott Tringali - 2001-03-25
    • assigned_to: nobody --> tringali
  • Alexander Mai

    Alexander Mai - 2001-11-17

    Logged In: YES

    It's not a bug and should be moved to feature requests.
    And no, IMHO we should add this. Actually you can always
    mess up things by a typo, "rm -rf /" can also be dangerous ...

  • Alexander Mai

    Alexander Mai - 2001-11-17
    • status: open --> open-invalid
  • Thorsten Haude

    Thorsten Haude - 2002-02-24

    Logged In: YES

    I agree with Alexander, it's really a feature request, and
    we could never catch all typos. Can this be closed?

  • Scott Tringali

    Scott Tringali - 2002-02-26

    Logged In: YES

    Changed to a feature request.

    Of course we can't catch all typos, but at least we can give
    a way to stop this long and potentially deadly operation.
    (After all, you _can_ ^C a 'rm -rf /' when you realize that
    it's taking a bit longer than you expected...!)

  • Scott Tringali

    Scott Tringali - 2002-02-26
    • labels: 100100 -->
    • milestone: 103146 -->
    • assigned_to: tringali --> nobody

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks