When I import pictures from my camera in Shotwell, it also imports the video clips. This is somewhat annoying, as I would like to store my videos in another folder. I've tried to write a bash command to do this, but have not had success.
I need a command that meets the following requirements:
- Locate all files in a directory structure that do not have an extension of .jpg, .png, .gif, or .xcf (case insensitive).
- Move all of these files into a target directory, regardless of whether the file names or directory paths contain spaces or special characters.
Any help would be appreciated!
EDIT: I'm using the default shell in Ubuntu, meaning that some commands are aliased, etc.
EDIT 2: I've attempted this myself (not the copy part, just the listing of files part). I turned on extglob and ran the following command:
$ ls -R /path | awk '
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }'
This lists everything. I tried using grep on the end of it, but haven't the foggiest idea of how to get it to not match a pattern I give it. The extglob switch didn't help much with grep, even though it does help with other commands.