Detailed CPU Usage Overview With psacct

Published on Author gryzli

If you ever asked yourself the following questions, this might be the right place for you: How to check how much cpu is consuming each system user ? How to check how much cpu is consumed by each command ? Check when a command has been executed and how much cpu it did ? How… Continue reading Detailed CPU Usage Overview With psacct

Linux Admin Daily Usage

Published on Author gryzli

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”.

    Using Linux moreutils  Recently I found out the existence… Continue reading Linux Admin Daily Usage

Sed – Deleting Multiline Patterns

Published on Author gryzli

Here is an easy way to delete multiline patterns with sed.   Let say we have the following pattern:  

  Now consider we want to delete the BEGIN/END block,  containing “ID:45”:

  And here is some explanation of the command run above:

 

Installing perlbrew on Centos/Rhel/Fedora

Published on Author gryzliLeave a comment

Why you may need perlbrew ? Perlbrew gives you the ability to maintain multiple perl versions, each having different set of install perl modules. The concept is not any new, we have already seen such things in Python (virtualenv) or Ruby (rvm). Basically you get the following benefits (as state in the perlbrew site also):… Continue reading Installing perlbrew on Centos/Rhel/Fedora

Centos/RHEL/Fedora Create Your Own YUM Repository

Published on Author gryzliLeave a comment

If you have learned how to build your own rpm packages (or want to use custom already built ones) , you maybe want to use your own yum repository for installing these packages. In the following how-to I will show you how to easily setup a yum repository. Prerequisites 1| Install createrepo First you need… Continue reading Centos/RHEL/Fedora Create Your Own YUM Repository

Centos/RHEL/Fedora Build RPM Package From Scratch

Published on Author gryzliLeave a comment

Why to create your own RPM Package ? In the following post, I will explain how one could easily build RPM package from a custom files. Let say you have added some custom scripts or files and you want to create RPM of them, here is how to do it.   How to build your own… Continue reading Centos/RHEL/Fedora Build RPM Package From Scratch

YUM – List all avialable packages from a given repository – Fedora/Centos/Rhel

Published on Author gryzliLeave a comment

1. Get the repository ID This is sample repolist on Centos/RHEL 7.X

  The repo ID for Atomic repo is: “atomic“ This is sample repolist on Centos/RHEL 6.X

  The repo ID for Webmin is: “Webmin”    2. List all available packages from a given repository List all packages for repo: Webmin

Continue reading YUM – List all avialable packages from a given repository – Fedora/Centos/Rhel

Linux ImageMagick (convert) some basic stuff

Published on Author gryzliLeave a comment

ImageMagick (convert) tool could be used for different image manipulation tasks. Here I will mention some of them I have used it for. Get verbose information about image # convert some_test_image.jpg -verbose info:   Change JPEG image quality # convert original_image.jpg -quality 50 new_image_with_50_quality.jpg   Convert/Resize image to 1600×1600 to fit ebay requirements I need this conversion in order… Continue reading Linux ImageMagick (convert) some basic stuff

lftp – Rsync over FTP alternative

Published on Author gryzliLeave a comment

This is very useful software, which can be used for “mirroring” data through FTP. Under Centos 6.x, the package is called: lftp , and is available through standard package repo. Here are some usage examples;   1. Mirror Destination FTP directory –> To local directory

  2. Mirror  Local directory  –> To destination FTP directory… Continue reading lftp – Rsync over FTP alternative