Spec me a shell command

Soldato
Joined
16 May 2005
Posts
6,509
Location
Cold waters
Hi - Does anyone know how to do the following in BASH?

Find all files with a given extension .xyz in directory A (recurse sub-directories) and move them all to directory B?
 
Hi - Does anyone know how to do the following in BASH?

Find all files with a given extension .xyz in directory A (recurse sub-directories) and move them all to directory B?

find /directoryA -type f -name "*.xyz" | xargs mv --target-directory=/directoryB
 
Last edited:
Back
Top Bottom