desktop cleaning

Nils Kassube kassube at gmx.net
Thu Nov 15 11:29:13 UTC 2007


Shibu C Varughese wrote:
> On 11/15/07, Shali 9846303531 <shalib2 at gmail.com> wrote:
> >  ls -l |grep -v d| awk '{print $8}'|xargs rm
> >
> > you suggested this script but where do i put my files name that r not
> > to be deleted
>
> hi ...
> don't run this command ...within any dir ... you need to know what you
> are doing ...the above is just an example .... in which it will only
> remove file and will keep the directories.

How is this helpful? If the OP knows what your command does, he doesn't 
need to ask for help.

> and more  ... grep -v *.jpg    etc ... to avoid deleting that files

The command "grep -v *.jpg" given in a directory full of JPEG files will 
only display lots of error messages.

> You should always test ... before you do this in production.

While this is a good advice, please use it yourself. I.e. please test your 
suggestions before you post it, if you don't know for sure it is correct. 
I do appreciate your will to help, but please don't post dangerous 
commands like the first one.


Nils




More information about the ubuntu-users mailing list