Removing thousands of files using rm

From: Steve Bertrand (iaccounts_at_ibctech.ca)
Date: 07/06/04

  • Next message: Bill Moran: "[REPOST] Compatibility with certain VIA and Realtek NICs"
    Date: Tue, 6 Jul 2004 10:15:54 -0400 (EDT)
    To: freebsd-questions@freebsd.org
    
    

    I often have the need to remove hundreds or even thousands of files from a
    single directory (very often). Using rm, I usually get:

    pearl# rm -rvf *
    /bin/rm: Argument list too long.

    Is there any way to work around this instead of having to select a small
    bunch of files at a time to remove?

    The directory I am trying to remove the files from is always hot, so
    deleting the directory is unfortunately not an option. (I don't think).

    Any assistance is greatly appreciated.

    Tks all,

    Steve

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Bill Moran: "[REPOST] Compatibility with certain VIA and Realtek NICs"

    Relevant Pages

    • Re: GTK+ File dialog hangs
      ... burns up the CPU. ... I've never had a single directory with 12000 files. ... Give a man a fish, and he eats for a day. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: "FFIND" Exit Codes?
      ... quite possible that FFIND never sets the errorlevel. ... attribute A are present in a single directory, ... HTH, Steve ... I finally had some free time to work on this. ...
      (comp.os.msdos.4dos)
    • Re: Buy an Earthshaker on Ebay from a former spelling bee champion!
      ... I live 10 miles east of Manteca. ... Steve ... Tell the pearl out there I say hello! ...
      (rec.games.pinball)
    • Re: Removing thousands of files using rm
      ... Steve Bertrand had this to say: ... >single directory. ... To unsubscribe, ...
      (freebsd-questions)
    • RE: Large number of files in single directory
      ... Large number of files in single directory ... tools like tar, gzip, rm, mv, cp and others stop working properly. ... switch to work with extremely long argument lists? ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
      (RedHat)