bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to delete the garbage file in my directory


From: Bob Proulx
Subject: Re: How to delete the garbage file in my directory
Date: Wed, 29 Sep 2004 23:45:42 -0600
User-agent: Mutt/1.3.28i

address@hidden wrote:
> In the followimg directory of mine, there is a file named
> download2_RXTE_data.txt, which has been produced for unclear
> reasons.

Because of the way the files are listed I suspect there is a space in
the name.

> address@hidden dinggq]$ ls
> article/     cxcds_param/               hexte/                    oridata/  
> SS433/  udata/
> CARPS/    download2_RXTE_data.txt     hexte_calib_data  pca/      temp/     
> zz/
> CirX-1/    download_RXTE_data.txt      ihep/                     pfiles/    
> temp1/
> address@hidden dinggq]$ rm download2_RXTE_data.txt
> rm: cannot lstat `download2_RXTE_data.txt': No such file or directory
> address@hidden dinggq]$
> 
> Would you please tell me how to delete the garbage file
> (download2_RXTE_data.txt) in the directory ?

I would use 'ls -b' to escape the names and see what is really there.
I suspect you will find an escaped space '\ ' somewhere in there.

You can have the shell use wildcards to match.  I would list it first
because I would be wanting to know the reason.  Then I would be
removing it the same way.  Best to use the -i option in this case.

  ls -ldb *download2_RXTE_data.txt*

  rm -i *download2_RXTE_data.txt*

Hope that helps.
Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]