Re: to delete file "q!"

From: Bryan Dongray (altnews_at_dongrays.com)
Date: 08/11/05

  • Next message: parv: "Re: prevent user to delete files in its own directory"
    Date: Thu, 11 Aug 2005 01:16:40 GMT
    
    

    ukarekar wrote:
    > Something else please

    It's likely it was created through using vi and ending the session with:
            :w q!
    so my guess is there are no hidden characters in the filename (like spaces).
    But use:
            ls -q
    to see if there are.

    Ways to remove such a file:
            rm q!
    as ! should not be a special character

    But if it is:
            rm 'q!'

    Using a shell variable might mask the specialness via the shell:
            X=q!
            rm "$X"

    How about using a known shell:
            sh -c "/bin/rm 'q!'"

    How about using a totally different program:
            perl -e 'unlink "q!";'

    I'm sure this can be done in even more inventive ways.

                            Bryan Dongray


  • Next message: parv: "Re: prevent user to delete files in its own directory"

    Relevant Pages

    • Re: I found an even easier way to crash CMUCL 19c/19f on FreeBSD 7.1
      ... I seem to remember you were using an UNIX shell account. ... new e-mail to your own computer at the start of the session, ... The version of Emacs here is horribly broken. ... Hmm, when I upload new versions of my source files, I keep around ...
      (comp.lang.lisp)
    • Re: I found an even easier way to crash CMUCL 19c/19f on FreeBSD 7.1
      ... I seem to remember you were using an UNIX shell account. ... new e-mail to your own computer at the start of the session, ... The version of Emacs here is horribly broken. ... Hmm, when I upload new versions of my source files, I keep around ...
      (comp.lang.lisp)
    • Re: SIGHUP and Session leaders (was Re: Start scripts under linux)
      ... Set the variables in your shell equally. ... And note who is the session ... Why doesn't my process get SIGHUP when its parent dies? ... and one or more processes in the orphaned group are ...
      (comp.os.linux.setup)
    • Re: Detaching processes on VMS
      ... it is still a single session so you end up with dualing keyboards. ... * Pull up a Unix shell window on your desktop workstation at the office. ... Type Ctrl-A-P to go to the previous shell session. ... still, somehow, leaving my edit session running on the VMS system? ...
      (comp.os.vms)
    • Re: Detaching processes on VMS
      ... it is still a single session so you end up with dualing keyboards. ... >* Pull up a Unix shell window on your desktop workstation at the office. ... >* Run nethack or tetris for terminals until bored. ... Certainly the original designers of VMS would've been aware of it. ...
      (comp.os.vms)