← All courses

find and xargs: search and bulk operations

Track down any files by name, age, permissions, size and owner, and process them in bulk — even with spaces in their names.

23 tasks
  1. find: files by nameeasy
  2. find: directories onlyeasy
  3. find: all hidden files in the projecteasy
  4. find: by modification timeeasy
  5. find: newer than referenceeasy
  6. find -empty: empty fileseasy
  7. find -perm: by access permissionseasy
  8. find -size: files larger than 1 MBeasy
  9. find -maxdepth: no descending into subdirectorieseasy
  10. find -user: files by ownereasy
  11. find -exec: make executablemedium
  12. find -delete: delete by patterneasy
  13. find -prune: exclude a directorymedium
  14. find -print0 | xargs -0medium
  15. xargs -0: names with spacesmedium
  16. xargs: delete files from a list with spacesmedium
  17. xargs -I: templated commandmedium
  18. Split a list into groups of threemedium
  19. find + xargs grepmedium
  20. find: database dumps older than a weekeasy
  21. find: clean dangling links out of the assetsmedium
  22. find: compound filtermedium
  23. Compress logs in parallel and safely with respect to spacesmedium