=== TheMetamorphosis is now known as Metamorphosis
=== FrankF1 is now known as FrankF
rtn0how can i rename more than one file, via some sort of regex?05:19
rtn0for example, if i have "file 1.txt" and "file 2.txt", both in the same dir, but i want to rename them by replacing the spaces in the filenames with underscores _, then how would I most efficiently go about it?05:19
rtn0(so they would now be file_1.txt and file_2.txt. this is what i am trying to do.)05:19
rtn0is there a command line command for that?05:19
rtn0thx in advance.05:19
guivercrtn0, the rename command will do that05:20
rtn0guiverc: okay. TU. so what syntax would i use in the theoretical example above? can rename take more than one file like that?05:21
rtn0like can i tell it "rename, I would like you to replace every space with an underscore instead, pls"? if so, what syntax to do so05:21
guiverc`rename 'regex' filename` is the rough syntax...05:22
guiverc`rename s/\ /_/ *` maybe is a quick example05:23
guiverc(though I'd test it first, I've not used rename in some years)05:24
rtn0okay so whatever comes immediately after the s/ is the thing to be replaced with something else, and after the next / comes what you are repacing it with?05:25
rtn0is that correct?05:25
rtn0guiverc: so IOW, s/a/b/ would replace a with b?05:26
rtn0and $rename s/a/b/ * would theoretically replace every occurence of the letter a in names with letter b, correct?05:26
guivercI'd suggest reading the manual (man rename) first.., and as I suggested I'd create a sample directory with like filenames & test there first to ensure you've understood it05:26
rtn0guiverc: ok np. thx agn.05:27
rtn0i will let u know if successful.05:27
rtn0guiverc: ok i tested it.05:32
rtn0it works, thank you very much guiverc.05:33
rtn0im still pretty new to linux. 6 months experience. still learning.05:33
rtn0This is something I have been curious about from the beginning, just haven't had a chance to get around to learning it until now, cuz ive been so busy learning other things -- like 100 things per day. :p05:34
rtn0drinking from a fire hose.05:34
rtn0gnite all06:10
=== root is now known as Guest87226
=== raj_149 is now known as raj_
marcihi all!17:56
marciinstalled my ubuntu macbook laptop 3gbyte and ssd drive, very fast :)17:57

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!