Closed Thread Icon

Preserved Topic: rm -r *.bak (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20950" title="Pages that link to Preserved Topic: rm -r *.bak (Page 1 of 1)" rel="nofollow" >Preserved Topic: rm -r *.bak <span class="small">(Page 1 of 1)</span>\

 
jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 07-13-2001 23:03

Can anyone explain why this command is only affecting the current directory contents? I thought it was supposed to recursively descend into subdirectories.

-jiblet

JakeB
Paranoid (IV) Inmate

From: us
Insane since: Oct 2000

posted posted 07-18-2001 01:12

I don't know if it will work, but maybe try ./*.bak



[This message has been edited by JakeB (edited 07-18-2001).]

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 07-18-2001 01:30

rm -r *.bak looks for files name anything followed by .bak. Unless you have a directory named something.bak, the command will ignore all your current directories.

Try something like rm -r ./*/*.bak and I'm not even sure that will work.

This command will work find . -name "*.bak" -exec rm {} \;. Tha command will find all files below the current directory and delete them if the are named according to the pattern "*.bak".




jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 07-18-2001 21:08

Ah, i see, thanks.

-jiblet

« BackwardsOnwards »

Show Forum Drop Down Menu