Linux Admin Daily Usage

Published on Author gryzliLeave a comment

Shell   Calculate the size of all files from a given type/extension Recently I need something for doing such calculations and end up with the following command line (found on stackexchange), which will calculate the size summary for all “*.jpg” files in “some_directory”. find some_directory/ -type f -name ‘*.jpg’ -exec du -ch {} + |… Continue reading Linux Admin Daily Usage

Linux iptables – Tips, Tricks…

Published on Author gryzliLeave a comment

Add Iptables rule with a comment Recently I needed to add iptables rule, which I can easily search later and get it’s id. What I needed some kind of “mark” of this rule, which seems that Iptables already had as a functionality – assign comments on iptables rule. Here’s some simple example: # iptables -t… Continue reading Linux iptables – Tips, Tricks…