Date: Sun, 01 Jul 2018 15:41:48 -0500 From: Paul Schmehl <pschmehl_lists@tx.rr.com> To: Yasuhiro KIMURA <yasu@utahime.org>, freebsd-questions@freebsd.org Subject: Re: Problem deleting files Message-ID: <39CDF0B8DF2CB21B11F47BD6@Pauls-MacBook-Pro.local> In-Reply-To: <20180702.044831.477271088854915236.yasu@utahime.org> References: <85B4CFC22AC0CA70B917D42D@Pauls-MacBook-Pro.local> <20180702.044831.477271088854915236.yasu@utahime.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--On July 2, 2018 at 4:48:31 AM +0900 Yasuhiro KIMURA <yasu@utahime.org> wrote: > From: Paul Schmehl <paul.schmehl@gmail.com> > Subject: Problem deleting files > Date: Sun, 01 Jul 2018 14:13:30 -0500 > >> I have a problem with a directory full of files that I can't seem to >> delete. >> >> rm * returns argument list too long. So does file * >> >> find . -type f -exec rm [] \; returns rm: []: No such file or >> directory over and over again. > > Try following command. > > find . -type f -print0 | xargs -0 rm -f > > If it is only a matter of the number of files, then this should work > well. This seems to be working, although it's taking quite some time. ls | wc -l 4698409 Thanks for the suggestion. It may take a while, but I think this will work. Paul Schmehl, Retired As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39CDF0B8DF2CB21B11F47BD6>