[svlug] removing multiple directories

jim jim at well.com
Fri May 9 17:31:22 PDT 2008


   it would help if you show the directory 
hierarchy (i.e. what does the  ls  command 
show). 

   given that you want to remove all files and 
directories under 
cje at rb:/media/videos/10.2.cje/harddrive05/ 

$ cd /media/videos/10.2.cje/harddrive05 
$ ls   # what does this show? 
$ rm -R * 

   the above will remove recursively everything 
below the current directory with the exception 
of any files or directories that begin with 
the  .  character. 

   the command you showed in your email asks 
the  rm  command to recursively remove all 
files that have a  .  character anywhere in 
their names. 
   i'm guessing you learned that  *.*  business 
from your MS-DOS days. 


On Fri, 2008-05-09 at 16:53 -0700, Christian Einfeldt wrote:
> hi
> 
> I would like to rm a bunch of video that I have backed up, and I am
> finding that I am having to do 
> 
> $ sudo rm -r [dirname] 
> 
> for each individual dir, and there are multiple directories.  I tried 
> 
> $ sudo rm -r *.*
> 
> and I got this error
> 
> cje at rb:/media/videos/10.2.cje/harddrive05$ sudo rm -r *.*
> rm: cannot remove `*.*': No such file or directory
> 
> How would I rm the directories below harddrive05 in one fell swoop?  I
> am obviously making some kind of basic mistake.  Thanks in advance.  
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug




More information about the svlug mailing list