Skip to main content
deleted 2 characters in body
Source Link
Stéphane Chazelas
  • 584.8k
  • 96
  • 1.1k
  • 1.7k
for ms in Class/*/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done

With your approach, you need to a shell to expand the MarkSheet* glob. So:

find . -mindepth 3 -maxdepth 3 -type d -exec sh -c '
  for dir do
    find "$dir" -type f -newer "$dir"/MarkSheet*
  done' sh {} +
for ms in Class/*/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done

With your approach, you need to a shell to expand the MarkSheet* glob. So:

find . -mindepth 3 -maxdepth 3 -type d -exec sh -c '
  for dir do
    find "$dir" -type f -newer "$dir"/MarkSheet*
  done' sh {} +
for ms in Class/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done

With your approach, you need to a shell to expand the MarkSheet* glob. So:

find . -mindepth 3 -maxdepth 3 -type d -exec sh -c '
  for dir do
    find "$dir" -type f -newer "$dir"/MarkSheet*
  done' sh {} +
added 196 characters in body
Source Link
Stéphane Chazelas
  • 584.8k
  • 96
  • 1.1k
  • 1.7k
for ms in Class/*/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done

With your approach, you need to a shell to expand the MarkSheet* glob. So:

find . -mindepth 3 -maxdepth 3 -type d -exec sh -c '
  for dir do
    find "$dir" -type f -newer "$dir"/MarkSheet*
  done' sh {} +
for ms in Class/*/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done
for ms in Class/*/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done

With your approach, you need to a shell to expand the MarkSheet* glob. So:

find . -mindepth 3 -maxdepth 3 -type d -exec sh -c '
  for dir do
    find "$dir" -type f -newer "$dir"/MarkSheet*
  done' sh {} +
Source Link
Stéphane Chazelas
  • 584.8k
  • 96
  • 1.1k
  • 1.7k

for ms in Class/*/*/*/MarkSheet*; do
  find "${ms%/*}" -type f -newer "$ms"
done