-
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.
-
Try double quoting the filename;
rm /path/to/file/"junk_name"
-
didn't work
>rm /users/xyz/"???Q?P???b?"
rm: cannot lstat `/users/xyz/???Q?P???b?': No such file or directory
-
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.
-
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."
-
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.
-
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.
-
-
-
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
-
That's what I said
-
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've never had a problem deleting files like this with Nautilus.
-
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
-
Forum Rules
|
|