On August 29, 2005 13:42, Ernest N. Wilcox Jr. wrote:
> On Monday 29 August 2005 01:32 pm, Mikkel L. Ellertson wrote:
>   | magnet wrote:
>   | > Hi, managed to download some rogue files by mistake using p2p and now
>   | > I cannot delete them. No matter what I do they appear listed as
>   | > present in konqueror or konsole window.
>   | >
>   | > Files all start with ":123 filename.gif".
>   | >
>   | > I have tried rm and shred but the shell complains it cannot lstat the
>   | > file and "No such file or directory"
>   | > ls -a returns a list of these 3 files in the directory.
>   | >
>   | > Can anyone help me delete these files please?
>   | >
>   | > regards
>   | > magnet
>   |
>   | The problem, as you have discovered by now, is the : at the start of
>   | the file name, and the space in the file name. You can put quotes
>   | around them, and others have stated. Or you can escape the : by using
>   | \: instead of : - you can escape the space the same way. This allows
>   | things like rm \:123\ *.gif to match all the strange .gif files... You
>   | can check what would be matched by using ls instead of rm.
>   |
>   | Mikkel
>
> I forgot all about regular expressions. I suppose do not use them enough,
> although I do use them in my procmailrc file ...

You can also do an "rm -i *" (or "*.gif", or whatever wildcard you like), then 
press "y" for files you want to delete, and "n" for ones you don't. It's a 
convenient way to clean-up, unless there are a huge number of files to go 
through.

-- 
Ron
ronhd at users dot sourceforge dot net

Opinions expressed here are all mine.

"As you know, necessity is the mother of invention.
I don't know who the father is. Remorse, I guess." - Red Green

____________________________________________________
Want to buy your Pack or Services from Mandriva? 
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________

Reply via email to