Category Archives: Scripting

LOG-ROTATE AND Throw backups into AWS S3.

Every restaurant has a base sauce ready for different dishes, the same way I am sharing a base shell script to log-rotate custom logfiles and push archives into S3. You can modify the script as per the taste (^_-) To begin with, you must install s3cmd on your server first and configure it then create a tmp directory inside your

Read more

How to free PHP-fpm Memory at Server

  Often when you are running PHP with any web server (Apache or Nginx), the FastCGI process manager eats up a lot of your RAM, by forking multiple subprocesses for every request, which in turn leads to memory leakage. To avert this, it is desirable to schedule a shell script and reduce this memory leakage. Save the below command as

Read more

Impermanence in Linux – Exclusive (By Hari Iyer)

Impermanence, also called Anicca or Anitya, is one of the essential doctrines and a part of three marks of existence in Buddhism The doctrine asserts that all of conditioned existence, without exception, is “transient, evanescent, inconstant” On Linux, the root of all randomness is something called the kernel entropy pool. This is a large (4,096 bit) number kept privately in the kernel’s

Read more

Source – UNIX, Destination – Windows Cygwin (SSH Password-less Authentication)

On Windows Server In windows cygwin create user, say MyUser, locally and also create user in cygwin cd C:\cygwin Cygwin.bat   Administrator@MYWINDOWSHOST ~ $ /bin/mkpasswd -l -u MyUser >>/etc/passwd MyUser@MYWINDOWSHOST ~ $ ls MyUser@MYWINDOWSHOST ~ $ ls -al total 24 drwxr-xr-x+ 1 MyUser        None    0 Mar 17 12:54 . drwxrwxrwt+ 1 Administrator None    0 Mar 17 12:54 .. -rwxr-xr-x  1

Read more

Hack #1 -> Define CD Base Directory Using CDPATH

If you are frequently performing cd to subdirectories of a specific parent directory, you can set the CDPATH to the parent directory and perform cd to the subdirectories without giving the parent directory path as explained below. # pwd /home/ramesh # cd mail -bash: cd: mail: No such file or directory [Note: The above cd is looking for mail directory

Read more
« Older Entries