Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Cryptic unkown file?

  1. #1

    Default Cryptic unkown file?

    Hi,

    for some reason a file has appeared in my /home directory:
    ?Ŷ?Ƶ????

    Code:
    david@PC:~> ls
    bin  Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  ?Ŷ?Ƶ????
    Supposedly it's 30kB but it cannot be deleted as it shows the file to be "non-existant":
    Where does it come from? What's doing there and how can I get rid of it?

    Thanks

  2. #2

    Default Re: Cryptic unkown file?

    I have experience with this recently on a RedHat server. You can do something like:

    md tmp
    mv * tmp
    cd tmp
    mv [a-zA-Z0-9_]* ..

    Then examine that the only thing left is the offending file, else move any remaining files/folders back. Once the offending filename is isolated, you can either delete ~/tmp, or give it a sane name by doing "mv * filename" if you want to further examine the file.

  3. #3
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,130

    Default Re: Cryptic unkown file?

    Quote Originally Posted by SF6 View Post
    for some reason a file has appeared in my /home directory:
    ?Ŷ?Ƶ????
    ...
    cannot be deleted as it shows the file to be "non-existant":
    Where does it come from? What's doing there and how can I get rid of it?
    What is it ?
    You do not say who owns this file, when it was created/modified or what it contains.
    As this appears to be a “desktop session” machine, the simplest thing to do is to use a graphical file manager to find the file properties and delete it via the right-click menu -- hold the shift-key down to convert “Move to Wastebin” to “Delete”.

    One of your problems could be that it is possible to create a filename that starts and/or ends in a non-printing character or space. Otherwise you can often manipulate the file(name) by enclosing it in (single) quotes.
    ~Thank you for sharing an interesting problem.
    --
    slàinte mhath,
    rayH

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,721

    Default Re: Cryptic unkown file?

    Quote Originally Posted by SF6 View Post
    Hi,

    for some reason a file has appeared in my /home directory:
    ?Ŷ?Ƶ????

    Code:
    david@PC:~> ls
    bin  Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos  ?Ŷ?Ƶ????
    Supposedly it's 30kB but it cannot be deleted as it shows the file to be "non-existant":
    Where does it come from? What's doing there and how can I get rid of it?

    Thanks
    Why do you not at least give an
    Code:
    ls -l
    so we (and you) have a little bit of information about that file.

    Also
    Code:
    file *
    And saying "it shows ..." is no information. Who is "it"?
    Henk van Velden

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,721

    Default Re: Cryptic unkown file?

    Quote Originally Posted by xorbe View Post
    I have experience with this recently on a RedHat server. You can do something like:

    md tmp
    mv * tmp
    cd tmp
    mv [a-zA-Z0-9_]* ..

    Then examine that the only thing left is the offending file, else move any remaining files/folders back. Once the offending filename is isolated, you can either delete ~/tmp, or give it a sane name by doing "mv * filename" if you want to further examine the file.
    I think one should be careful with this. I do not know where you did this and doing it in some directory with data might be harmless, but doing it in one's own home directory while being logged in might be a bad idea.
    Henk van Velden

  6. #6

    Default Re: Cryptic unkown file?

    True that is, here is the information:

    ls -l:

    Code:
    -rw-r--r--   1 david users 31170 Jul  9 12:21 ?Ŷ?Ƶ????
    file * gives:

    Code:
    �Ŷ�Ƶ���: data

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,721

    Default Re: Cryptic unkown file?

    Thanks a lot.

    Quote Originally Posted by SF6 View Post
    True that is, here is the information:

    ls -l:

    Code:
    -rw-r--r--   1 david users 31170 Jul  9 12:21 ?Ŷ?Ƶ????
    Which shows that it david is the owner and that it has "normal" permissions. In fact it tells us not much more then that it was a process used by david that created it. But negative info is also info.

    Quote Originally Posted by SF6 View Post
    file * gives:

    Code:
    �Ŷ�Ƶ���: data
    Which looks as being a bit useless because everything is data of course. But as file is pretty good at detecting all sorts of file formats, we may conclude that it is not just one of the more common ones with a strange name. It is has also an unknown contents (e.g. file would detect plain ASCII text if it was something like that).

    Now there are two ways to go. One is to simply remove the file, which will never tell us why and what. The other is to try to find out first if we can get more information out of that file.

    It is of course up to you to decide. It isn't really in the way I presume, thus we can spend some time on investigating. But when you just want to remove it and carry on, that is fine, but you never know if it will happen again tomorrow.

    First thing would be to see if we can find a regexp that gives you the file name. Try
    Code:
    ls *Ŷ*
    When that gives you the file, the try to find what the bytes in the name are:
    Code:
    ls *Ŷ* | od -x
    Oh and btw, when posting commands and their output, best is to post complete: the prompt, the command, the output and the next command. Like you did in the first post here. Then we can be sure we see all there is to see.
    Henk van Velden

  8. #8

    Default Re: Cryptic unkown file?

    Yes, my suggested idea of using regex to get at the filename is the key for a command line solution. That's also a good application of the idea.

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,721

    Default Re: Cryptic unkown file?

    Quote Originally Posted by xorbe View Post
    Yes, my suggested idea of using regex to get at the filename is the key for a command line solution. That's also a good application of the idea.
    Well, the problem here is IMHO not so much to use some expression. That you do normally when there are some characters "that are special to the shell" in the name. But in this case there are apparently some bytes there that do not fit into the used character encoding (most probably UTF-8). Thus, what we see is just a sort of fall back interpretation of the software component that tries to create the characters. And that "emergency action" might result in different solutions for different software (see the ? in one listing and the � in another).

    I do not think that removing it will be a big problem. But the real solution (root cause) is of course: which program created it and why did it use such a strange encoding (if it is an encoding and not some random bytes).
    Henk van Velden

  10. #10

    Default Re: Cryptic unkown file?

    To see hidden characters in the file name you should be able to use: ls -b

    To see the content of the file as an octal dump of characters, because of where you show it is located you can try:

    Code:
    find . -maxdepth 1 -type f ! -name '.*' -exec od -c {} \;
    You can probably also use the same find command to remove the file.
    I don’t have anything to hide, but I don’t have anything I want to show you either.

Page 1 of 2 12 LastLast

Posting Permissions

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