you know... the reason I was doubting that page is because it says that \s matches any white space and in the example that worked: rename 's/:/-/' * looks to me as if it is saying to search for a blank space followed by a colon and then (i guess) the next forward slash tells it to replace it with a dash. Then the final '\' closes the statement and that too is a tatement surrounded by apostrapheses. Is that right? On Sat, Jan 30, 2016 at 2:09 PM, Brian Cluff wrote: > Regular expressions is a pretty big topic. It's not super easy like > globing (like the * you've been using in bash) which you can get the idea > from the 544 page book ( > http://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124/ > ) that can be bought on regular expressions. The equivalent book on > globing would be a pamphlet. > > That being said, the basics aren't too hard to learn, but you have to keep > in mind that they are fairly different, and don't always act like what you > would think. > > There are a ton of howtos out there and they take a lot of different > approaches to explaining thing, I would just search google for them until > you find one that speaks to you. > > Brian Cluff > > > On 01/30/2016 11:54 AM, Michael wrote: > > thank you Brian. Does anyone happen to know of a perl regexr list. I found > one but am not sure if it is right: > > http://www.cs.tut.fi/~jkorpela/perl/regexp.html > > On Sat, Jan 30, 2016 at 11:43 AM, Brian Cluff wrote: > >> You can't rename files that way. The * on the command line gets turned >> into real file names by bash before they are ever given to the mv command >> so you are tell the command line to consist of any files with a : followed >> by any files with an = or -. >> At best your command will error out, at worst it will overwrite an >> existing file. >> What you are needing is a program that can take a pattern and rename >> files with a different pattern. There are 2 that I've used, mmv and >> rename. Of the 2, you probably have rename on your system already since it >> gets pulled in with PERL. If not, just install the rename package. >> >> With rename all you have to do is: >> rename 's/:/-/' * >> >> That will use a regular expression to change all the files in the current >> directory that contain a : in their name to the same name with a - >> replacing the :. >> >> Be very very careful with the rename command, it can and will clobber >> every file that it touches before you know it just because you got a single >> character out of place. >> When in doubt add the -n option so that it will tell you what it's going >> to do without actually doing it. Then if everything looks good, run the >> command again without the -n to actually make the changes. >> >> Brian Cluff >> >> >> >> On 01/30/2016 08:29 AM, Michael wrote: >> >> I'm sure that will fix it but what am I doing wrong in my attempts to >> rename them? >> >> $ mv *:* *=* >> mv: target ‘*=*’ is not a directory >> $ mv *:* *-* >> mv: target ‘darktable-1:9Download’ is not a directory >> $ mv *:* ./*-* >> mv: target ‘./darktable-1:9Download’ is not a directory >> >> >> On Sat, Jan 30, 2016 at 10:29 AM, Matt Graham < >> mhgraham@crow202.org> wrote: >> >>> On Fri, Jan 29, 2016 at 6:45 PM, Michael < >>> bmike1@gmail.com> wrote: >>> >>>> the filesystem is probably FAT because it is a thumb drive.... >>>> rsync: mkstemp >>>> "/media/bmike1/RedSanDisk/Documents/Education/Darktable/.darktable-1:10WaterLilyEdit.CccL3o" >>>> failed: Invalid argument (22) >>>> >>> >>> It is not possible to have a ':' character in a filename on a FAT-based >>> filesystem. This is because that character was used to denote which disk >>> drive a file was on back in the DOS days... "C:\junk\stuff.txt" and so >>> forth. >>> >>> I am not sure what these hidden files contain, or whether they're >>> actually important. You can pass the "--exclude *\:*" option to rsync to >>> tell it to not try to transfer files that contain ':' characters, which may >>> help. >>> >>> -- >>> Crow202 Blog: http://crow202.org/wordpress >>> There is no Darkness in Eternity >>> But only Light too dim for us to see. >>> >>> --------------------------------------------------- >>> PLUG-discuss mailing list - >>> PLUG-discuss@lists.phxlinux.org >>> To subscribe, unsubscribe, or to change your mail settings: >>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss >>> >> >> >> >> -- >> :-)~MIKE~(-: >> >> >> --------------------------------------------------- >> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >> To subscribe, unsubscribe, or to change your mail settings:http://lists.phxlinux.org/mailman/listinfo/plug-discuss >> >> >> >> --------------------------------------------------- >> PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org >> To subscribe, unsubscribe, or to change your mail settings: >> http://lists.phxlinux.org/mailman/listinfo/plug-discuss >> > > > > -- > :-)~MIKE~(-: > > > --------------------------------------------------- > PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org > To subscribe, unsubscribe, or to change your mail settings:http://lists.phxlinux.org/mailman/listinfo/plug-discuss > > > > --------------------------------------------------- > PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org > To subscribe, unsubscribe, or to change your mail settings: > http://lists.phxlinux.org/mailman/listinfo/plug-discuss > -- :-)~MIKE~(-: