[clug] Emptying trash

Brett Worth brett at worth.id.au
Sat Nov 21 15:10:47 MST 2009

keith sayers wrote:
> 	I am using Suse and have developed an odd problem trying the empty trash - I 
> get an error message :  "[long file name] does not exist".  I have used 
> Konsole to go down the directory structure to Trash/files and sure enough the 
> stated file name is not there, but there is another - but different - long 
> file name which I cannot remove with RM.  This latter has some spaces in it.  
> Could there be a connection and could anybody suggest how to clear them?

You can delete a file with spaces in the filename by surrounding the name with quotes.  Or
a really easy way is to type the first couple of characters and do a <TAB> for filename
completion.  This will escape the spaces with a "\".

You can also use wildcards in the "rm" with the "-i" option.  This will prompt for each
file asking y or n.

[dart] touch a.c b.c
[dart] rm -i *.c
rm: remove regular empty file `a.c'? y
rm: remove regular empty file `b.c'? n

As usual there's a lot of ways to do it.


More information about the linux mailing list