[clug] Emptying trash
jhock
jhock at iinet.net.au
Sat Nov 21 16:40:51 MST 2009
On Sun, 2009-11-22 at 09:10 +1100, Brett Worth wrote:
> 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
> [dart]
>
> As usual there's a lot of ways to do it.
>
> Brett
You may also wish to use the -f option which should "force" the rm if
you are still having trouble removing the file. eg.
rm -fi *.c
OR
Use the
sudo rm -fi
command to force the rm using root but make sure it is the right file to
delete.
John
More information about the linux
mailing list