Skip to content
TheChatArchiveThe Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)Hugging Face OpenAssistant Conversations (oasst2)

Schreibe mir ein bash-script um die ältesten Dateien und Unterordner, innerhalb eines…

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    Schreibe mir ein bash-script um die ältesten Dateien und Unterordner, innerhalb eines ausgewählten Ordners zu löschen. Das Skript soll mit der jeweils ältesten Datei beginnen und dies so lange wiederholen bis der gewählte Ordner kleiner als 10 GB ist.

  2. Assistant

    #!/bin/bash

    find -maxdepth 1 -type f -exec rm -f "$1" {} ;

    find is a command that will find everything that has been asked for and -maxdepth is the way to specify how deep the find will work.

    Then, the -type f command specifies that it should only find things that are files (f) and -exec tells to delete everything that has been found.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.