how to delete file "?e??!?????"


Results 1 to 14 of 14

Thread: how to delete file "?e??!?????"

  1. #1
    Join Date
    Jul 2009
    Posts
    2

    how to delete file "?e??!?????"

    I had an accidental program execution that generated some junk files and I am not sure
    how to delete them.

    Ũ?e??!?????
    {?R0?q?
    ???Q?P???b?
    ??????f????


    >rm "\?\?\?\?\?\?f\?\?\?\?"
    rm: cannot lstat `\\?\\?\\?\\?\\?\\?f\\?\\?\\?\\?': No such file or directory

    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    1,012
    Try double quoting the filename;

    rm /path/to/file/"junk_name"
    You can tuna piano, but you can't tune a fish.

    http://www.lunar-linux.org/
    It's worth the spin.

    http://www.pclinuxos.com/page.php?7
    Puts the rest to shame.

  3. #3
    Join Date
    Jul 2009
    Posts
    2

    didn't work

    >rm /users/xyz/"???Q?P???b?"
    rm: cannot lstat `/users/xyz/???Q?P???b?': No such file or directory

  4. #4
    Join Date
    Dec 1999
    Location
    tx
    Posts
    1,190

    Try GUI or su/sudo

    If you can't get it from the command line, it sure isn't likely to be do-able from the file manager GUI, but I suppose you could try it.

    Also, run the file manager GUI from su or sudo just to avoid permissions problems.

  5. #5
    Join Date
    Jan 2003
    Location
    Austin, Texas
    Posts
    683
    what if you grep out all of the stuff that you want to keep and then try xargs rm? For example, let's say all you have in this directory are mp3 files, you could do something like:

    Code:
    ls | grep -v ".mp3" | xargs rm
    I would strongly recommend you run the command without piping into xargs first and make sure that it's ONLY listing the files that you want to be deleted. If it's listing something else you want to keep, pipe it into another grep -v before piping into xargs.
    "The author of that poem is either Homer or, if not Homer, somebody else of the same name."

  6. #6
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Before you assume that the ? characters that ls is showing you are actually ? characters in the filename, try these out:

    ls --quoting-style=escape
    ls --quoting-style=c
    ls --quoting-style=shell
    ls --quoting-style=literal

    (The last one might destroy your terminal instance, depending on what actual bytes are being printed. Exit the terminal you're in and start another one if this happens.)

    If you get anything other than question marks in these spaces for the "escape", "c", or "literal" quoting styles, then you need to pass these files to rm directly -- don't escape the question marks:

    echo ??????f????

    (Make sure only one file is echo'd there, so you aren't matching several files that all have a single "f" in this position in their names. If that's true, then continue.)

    rm ??????f????

    Alternately, you can use tab completion if you can type in the first character of any of these filenames. Do:

    rm X

    and then hit tab. (Where "X" is replaced by the first character of the filename.) The shell will autocomplete as much of the filename as it can, then stop; hitting tab a couple of times in quick succession when this happens will list all the options. You'll need to type in the next character yourself, and hit tab again to keep on completing. Once the shell has completed the entire filename, it'll add a space to the end; hitting return at that point should remove the file.
    Last edited by bwkaz; 07-28-2009 at 12:52 AM.

  7. #7
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    If it were me, I'd be looking for a solution involving wildcards. I don't know what other files are in the directory with your junk files, but if you could temporarily remove all the other files from the directroy , you could then try

    rm *Q*q*

    or even

    rm *

    with impunity.

  8. #8
    Join Date
    Sep 1999
    Posts
    3,202
    rm \?e\?*

  9. #9
    Join Date
    Sep 2002
    Location
    Harlow, UK
    Posts
    1,788
    If you have to ask why you want to install Linux, then perhaps you shouldn't.
    -- Michael D. Watts (Gone but never forgotten)

    Linux is not Windows | Posting Guidelines

    Code Monkey (YouTube)

  10. #10
    Join Date
    Sep 1999
    Location
    Cambridge, UK
    Posts
    509
    Come on guys you know the answer to this...
    Code:
    $ ls -li
    total 0
    743957832 -rw-r--r-- 1 furrycat furrycat 0 2009-07-28 10:58 Ũ?e??!?????
    $ find . -inum 743957832 -exec rm {} \;
    $ ls -li
    total 0

  11. #11
    Join Date
    Sep 2002
    Location
    Harlow, UK
    Posts
    1,788
    That's what I said
    If you have to ask why you want to install Linux, then perhaps you shouldn't.
    -- Michael D. Watts (Gone but never forgotten)

    Linux is not Windows | Posting Guidelines

    Code Monkey (YouTube)

  12. #12
    Join Date
    Jul 2002
    Location
    Vladivostok, Russia
    Posts
    9,053
    I have run into this situation numerous times with files I get from Japan or Korea. A simple rename and then "rm" does it for me.
    Last edited by JohnT; 08-04-2009 at 08:01 PM.
    "I was pulled over for speeding today. The officer said, "Don't you know
    the speed limit is 55 miles an hour?" And I said, "Yes, but I wasn't going
    to be out that long."

    How To Ask Questions The Smart Way
    COME VISIT ME IN RUSSIA NOW!!

  13. #13
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    I've never had a problem deleting files like this with Nautilus.

  14. #14
    Join Date
    Dec 2003
    Location
    United States
    Posts
    659
    some linux distros like "sabayon" require you to

    su
    password
    rm /file/path

    hope this helps.....PS im posting this with Internet Explorer (ack) wifes pc
    registered Linux user number 371609

    SaBaYoN LiNuX DoWnLoAd NoW

    Zip Ties = Reef Duck Tape

    If guns kill people, then...

    Pencils mis-speel...
    Cars make people drive drunk...
    Spoons make people fat...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •