February 19th, 2011, 10:58 AM
-
Move all files whose names contain a capital letter
Anyone have any ideas how I can move all files whose names contain a capital letter from one directory to another?
For instance:
I have files named
cat
dog
Zebra
oRanGuTang
But I only wanna move Zebra and oRanGutang
February 19th, 2011, 12:19 PM
-
You could give the following a go:
Code:
find /source/dir -type f -maxdepth 1 -name "*[A-Z]*" -exec mv {} /target/dir \;
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc