> /var/spool/directory, then glob * and unlink the resulting filenames,
> without prepending the directory?
>
> On Mon, Dec 4, 2017 at 11:05 AM, Gabriel Forster > wrote:
>
>> Readdirnames wasn't much better. Now using globbing and syscall.Unlink
>> which take ~
() {
upperDirPattern := "/var/spool/directory/*"
matches, err := filepath.Glob(upperDirPattern)
if err != nil {
fmt.Println(err)
}
for _, file := range matches {
syscall.Unlink(file)
}
}
On Monday, December 4, 2017 at 12:50:54 PM UTC-5, Gab
As far as I understand, that perl line is by far the fastest way to delete
files in linux. We're talking over 500k files on hdd.
On Monday, December 4, 2017 at 12:50:54 PM UTC-5, Gabriel Forster wrote:
>
> What takes 18 seconds in a perl command:
> perl -e 'for(<