14 Dec 2008 at 16:13 #1 Spyhop Spyhop 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?
14 Dec 2008 at 16:27 #2 eXor eXor Soldato Joined 13 Nov 2002 Posts 3,589 wush said: 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? Click to expand... find /directoryA -type f -name "*.xyz" | xargs mv --target-directory=/directoryB Last edited: 14 Dec 2008
wush said: 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? Click to expand... find /directoryA -type f -name "*.xyz" | xargs mv --target-directory=/directoryB
14 Dec 2008 at 22:08 #3 Spyhop Spyhop Soldato OP Joined 16 May 2005 Posts 6,509 Location Cold waters Thanks - Didn't get that exactly to work but reading about xargs got me there