User Tools

Site Tools


linux:find

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:find [2025/02/11 21:14] Wufflinux:find [2026/06/10 09:30] (current) – [find examples] Wuff
Line 97: Line 97:
 </code> </code>
  
 +get the total filesize of specific find command:
 +<code>
 +find . -type f -not -iname "*.epub" -not -iname "*.mobi" -print0 | du --files0-from=- -hc | tail -n1
 +84M total
 +find . -type f -not -iname "*.epub" -not -iname "*.mobi" -exec du {} \; | awk '{ total += $1 }END{ print total }'
 +85864
 +
 +</code>
 ====== Replace spaces with underscores ====== ====== Replace spaces with underscores ======
 Mass replace spaces with underscores Mass replace spaces with underscores
Line 111: Line 119:
 <code> <code>
 find . -type f -name "*.part" -exec sh -c 'mv "$1" "${1%.part}.!qB"' _ {} \; find . -type f -name "*.part" -exec sh -c 'mv "$1" "${1%.part}.!qB"' _ {} \;
 +
 +find . -type f -name '*.JPG' -print0 | xargs -0 sudo rename 's/.JPG$/.jpg/'
 </code> </code>
  
linux/find.1739308492.txt.gz · Last modified: by Wuff