find /home/user/somedir -depth -type d -empty -exec rmdir -v {} \; This CAN and WILL destroy all your data and eat your small { dog | cat | turtle | parrot } if you aren’t careful! ALWAYS check the path twice and then check it again before using.
Directory FileCount
I have close to 3000 images in a folder and needed to know exactly how many for a stupid bet I made. I dont feel like counting them! there must be something in the linux world to make this easier…. well there is. simple extension of the ls command. my directory is called images but… Continue reading Directory FileCount
bash file listing with markup
every now and again we need to take a bunch of file names from a folder and output then into a single file. sometimes with markup around them. Well there’s always ls. ls > test.txt this nets you the following in a file: 0.png 1.png blockcontent_h.png blockcontent_s.png blockcontent_v.png blockheader.png what if you want markup around… Continue reading bash file listing with markup
Archive & Compression utilities
Compression types and utils in Linux There are many compression utilities available to the average users on a linux system, so which one is best? well it all depends on what your intended use/goal for the file(s) is. Are you planning on sending the file to other OS’s? are you planning on decompressing the file… Continue reading Archive & Compression utilities
Cable pronz? A very neatly done Datacenter
[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_gallery admin_label=”Gallery” gallery_ids=”46,45,44,43,42,41,40,39,38″ gallery_orderby=”rand” fullwidth=”on” show_title_and_caption=”on” show_pagination=”on” background_layout=”light” auto=”on” auto_speed=”7451″ hover_overlay_color=”rgba(255,255,255,0.9)” caption_all_caps=”off” use_border_color=”off” border_color=”#ffffff” border_style=”solid” /][/et_pb_column][/et_pb_row][et_pb_row admin_label=”row”][et_pb_column type=”4_4″][et_pb_text admin_label=”bottom above footer” background_layout=”light” text_orientation=”left” use_border_color=”off” border_color=”#ffffff” border_style=”solid”]… Continue reading Cable pronz? A very neatly done Datacenter
Sed 101
SED aka stream editor is a utility app in linux / bsd systems (among others) which allows you to parse text in files based on simple regexp and change them based on its own set of rules. simple syntax for parsing and replacing text in a file called test.txt that contains the text I love… Continue reading Sed 101