Durchsuchen nach
Schlagwort: find

Linux Bash: to find the biggest folder in a directory.

Linux Bash: to find the biggest folder in a directory.

In order to find the biggest folder in a directory. You need the find command and xargs find . -type d -iname „Linu*“ -print0 | xargs -0 ls -ldhS The output: find . -type d -iname „Linu*“ -print0 | xargs -0 ls -ldhSdrwxr-xr-x. 1 sven sven 490 19. Mai 15:07 ./Videos/eigene_Aufnahmen/Linuxdrwxr-xr-x. 1 sven sven 348 6. Jul 21:06 ./Linux_PCdrwxr-xr-x. 1 sven sven 194 4. Sep 2024 ./.local/lib/python3.12/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_macdrwxr-xr-x. 1 sven sven 194 14. Mai 07:59 ./.local/lib/python3.13/site-packages/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_macdrwxr-xr-x. 1 sven sven 172 9….

Weiterlesen Weiterlesen

Linux Bash: Delete certain file types on your hard drives (no recycling bin)

Linux Bash: Delete certain file types on your hard drives (no recycling bin)

What is the command „find“? Okay, imagine your computer’s hard drive is like a giant library, full of books (files) in different rooms (folders). The find command is like a super-smart librarian that helps you locate specific books based on certain criteria. I create for my videos on YouTube (and Dailymotion) a lot of .mp4 files, because Kdenlive cannot use the container MOV. Kdenlive change it into the .mp4 file format. The mp4 files are bigger as mov files. For…

Weiterlesen Weiterlesen

In Linux Scripts und der Befehl „rm“

In Linux Scripts und der Befehl „rm“

Warum auch immer funktioniert der sonst übliche „rm“ Befehl in Scripts nicht. Die Hintergründe sind mir nicht geläufig und ich habe auch noch nichts gefunden. Es gibt aber eine Alternative. Man benutzt ein anderes Kommando, nämlich „find“. Das ist ein Auszug auf meines Aktualisierungsscript. Der Befehl „find“ ist eigentlich dazu da um Dateien zu finden. Nach der Verzeichnisangabe werden alle regulären Dateien gesucht (-type f) und dann kommt der Henker sozusagen mit dem Befehl -delete. Der Ordner „Trash“ ist der…

Weiterlesen Weiterlesen