Padding File names with zeros
need to pad some file names with zeros? couldnt be simpler! for f in foo[0-9]*; do mv $f `printf foo%05d ${f#foo}`; done rename ‘s/\d+/sprintf(“%05d”,$&)/e’ foo*
need to pad some file names with zeros? couldnt be simpler! for f in foo[0-9]*; do mv $f `printf foo%05d ${f#foo}`; done rename ‘s/\d+/sprintf(“%05d”,$&)/e’ foo*
Needed to remove spaces from filenames, so here we are 🙂 for file in *.mp3; do mv “$file” `echo $file | sed -e ‘s/ */_/g’ -e ‘s/_-_/-/g’`; done or replace all spaces by _ using perl ls *.bed |perl -ne ‘use File::Copy;chomp;$old=$_;s/\s+/_/g;move($old,$_);’ remove underscores rename ‘s/2012mp3/2012/’ *.mp3 Remove the letters mp3 from middle fo filename…
yum -y install xz Want to keep lots of logs, yet don’t want them cluttering up your logs directory and want them taking as little space as possible? well lets use a handy utility called logrotate and a compression utility called xz. xz is a lossless data compression program and file format which incorporates the…
Today I got a new VPS… well great but now I need to install a bunch of new packages and libraries and helper apps. how do I remember it all? did I have python 2.6 or 2.7? not to mention which boost libs did I install? well here.s a couple of ways to deal with…
[et_pb_section admin_label=”Section” fullwidth=”on” specialty=”off”][et_pb_fullwidth_post_title admin_label=”Fullwidth Post Title” title=”on” meta=”on” author=”off” date=”on” categories=”on” comments=”off” featured_image=”on” featured_placement=”background” parallax_effect=”off” parallax_method=”on” text_orientation=”center” text_color=”dark” text_background=”on” text_bg_color=”rgba(255,255,255,0.9)” module_bg_color=”rgba(255,255,255,0)” title_all_caps=”off” use_border_color=”off” border_color=”#ffffff” border_style=”solid”] [/et_pb_fullwidth_post_title][/et_pb_section][et_pb_section admin_label=”section”][et_pb_row admin_label=”row”][et_pb_column type=”4_4″][et_pb_text admin_label=”Text” background_layout=”light” text_orientation=”left” use_border_color=”off” border_color=”#ffffff” border_style=”solid”] While I have a bunch of music on my phone one does get tired of listening to the same…
Got an android tablet or phone you aren’t using? or are using but feel it can serve other purposes while not doing whatever you are forcing it to do against its will? well check Ultimate server app, a *FREE* app out that turns your android device into a server type of your choice! Overview – Add a…