kyalee
January 12th, 2009, 04:19 PM
I've been trying to increase my terminal-fu and last night I was playing with regular expressions and the rename command.
Did you know that
rename -n "s/t//g" /*
yields
/boot renamed as /boo
/etc renamed as /ec
/initrd.img renamed as /inird.img
/initrd.img.old renamed as /inird.img.old
/lost+found renamed as /los+found
/mnt renamed as /mn
/opt renamed as /op
/root renamed as /roo
/tmp renamed as /mp
I'm guessing that the system wouldn't have allowed me to do that for real (or would have at least made me log in as root before I did something that stupid) but still. Thank goodness for the no action flag. :lolflag:
Did you know that
rename -n "s/t//g" /*
yields
/boot renamed as /boo
/etc renamed as /ec
/initrd.img renamed as /inird.img
/initrd.img.old renamed as /inird.img.old
/lost+found renamed as /los+found
/mnt renamed as /mn
/opt renamed as /op
/root renamed as /roo
/tmp renamed as /mp
I'm guessing that the system wouldn't have allowed me to do that for real (or would have at least made me log in as root before I did something that stupid) but still. Thank goodness for the no action flag. :lolflag: