Hacker News new | ask | show | jobs
by adolph 11 days ago
As well as find has an -exec param to perform things one at a time or all with the same command by using a slash semicolon or a plus sign respectively:

  #order files from different levels in a file hierarchy by size:
  find . -type f -maxdepth 1 -exec ls -hlrS {} +

  #output metadata for each file sequentially
  find . -type f -maxdepth 1 -exec file {} \;