I performed a file-command on all elements in my Desktop directory:
~/Desktop > file *
then I grepped all the lines who have the string "image" in the description:
~/Desktop > file * | grep "image"
then I cut out only the file-name from the each line:
~/Desktop> file * | grep "image" | cut -d: -f1
From this step on, I do not know how to move all obtained filenames into one directory, I tried xargs, but I think I have a wrong understanding of it:
~/Desktop> file * | grep "image" | cut -d: -f1 | xargs mv {} ./dirk
grep
and replace theprintf
here with the propermv
command.