Skip to main content
highlight the downside
Source Link
Criggie
  • 1.8k
  • 13
  • 23

A halfway position between the two existing answers is to "inline" the find and use a for loop.

for f in `find . -name '*.avi' `
do
    mv "$f" .
done 

The back-ticks are what make the find command execute in place and then its output is substituted.

DownsideDownside is spaces and unexpected weird characters in filenames can cause issues. The answer by @Terdon is superior.

A halfway position between the two existing answers is to "inline" the find and use a for loop.

for f in `find . -name '*.avi' `
do
    mv "$f" .
done 

The back-ticks are what make the find command execute in place and then its output is substituted.

Downside is spaces and unexpected weird characters in filenames can cause issues. The answer by @Terdon is superior.

A halfway position between the two existing answers is to "inline" the find and use a for loop.

for f in `find . -name '*.avi' `
do
    mv "$f" .
done 

The back-ticks are what make the find command execute in place and then its output is substituted.

Downside is spaces and unexpected weird characters in filenames can cause issues. The answer by @Terdon is superior.

Source Link
Criggie
  • 1.8k
  • 13
  • 23

A halfway position between the two existing answers is to "inline" the find and use a for loop.

for f in `find . -name '*.avi' `
do
    mv "$f" .
done 

The back-ticks are what make the find command execute in place and then its output is substituted.

Downside is spaces and unexpected weird characters in filenames can cause issues. The answer by @Terdon is superior.