ENDEDemo vereinbaren
← Zurück zu allen Aufgaben

Ubuntu

Recursively go through the folders of the 'photos' directory and copy any .jpg files found into another directory named 'cpjpg'.

Aufgabe und Verlauf liegen im englischen Original vor.

Ergebnis
Gelöst
Punkte
1 / 1
Schritte
4
Dauer
3 min 2 s

Bewertungskriterien

  • Checks that exactly the expected JPG files ended up in the target folder.
Aufgabendefinition im OSWorld-Repository ansehen

Abschließende Antwort

Done! All .jpg files from ~/Desktop/photos (including subdirectories) have been copied to ~/Desktop/cpjpg. The following 4 files were copied: emnlp2023.jpg, hk_group_photo.jpg, hong-kong-china.jpg, and monk252520thailand252520wat252520arun252520scaled25255B225255D.jpg.

Verlauf

  1. Schritt 10:02

    The task is to recursively find all .jpg files in the 'photos' directory (on the Desktop) and copy them into the 'cpjpg' directory. Both folders are visible on the desktop. I'll use a shell command with find to recursively locate .jpg files and copy them to cpjpg. I need to draft and commit a plan first.

    • Plan erstellt
      1. Copy all .jpg files recursively from ~/Desktop/photos into ~/Desktop/cpjpg
    • Plan bestätigt1 Teilziele
  2. Schritt 20:22

    I need to recursively find all .jpg files in ~/Desktop/photos and copy them to ~/Desktop/cpjpg. I'll use a shell command with find to locate all .jpg files and copy them to the destination directory.

    • Shell-Befehlfind ~/Desktop/photos -type f -name "*.jpg" -exec cp {} ~/Desktop/cpjpg/ \;
    • Teilziel erreichtCopied all .jpg files from ~/Desktop/photos (recursively) to ~/Desktop/cpjpg using find + cp.
  3. Schritt 30:31

    The shell command exited with code 0, which means the find+cp ran successfully. Let me verify the files were actually copied by listing the cpjpg directory.

    • Shell-Befehlls ~/Desktop/cpjpg/
  4. Schritt 40:46

    The task is complete. The find+cp command copied all .jpg files recursively from ~/Desktop/photos into ~/Desktop/cpjpg, and the verification ls confirms 4 .jpg files are present in the destination. The subgoal was already marked done.

    • Als abgeschlossen gemeldet