Search and delete files older than “N” days

Lets see how we can  search specific  files or directory which was created “N” days before and delete. For example find files older than 60 days,   Replace the ls with -delete to remove files. Be careful, as you might end up deleting important files.  Always keep backups. Always run -ls option first to check about files. You have been warned. How to ask for confirm before deleting Explanation find : Find command /path/to/dir/ : Directory path to search -type f : Only works on files. (the -type d option…

Read More

Setup RabbitMQ Cluster on Ubuntu 18.04

RabbitMQ

RabbitMQ is one of the most widely deployed open source message brokers. It is an implementation of the Advanced Message Queuing Protocol (AMQP) and Streaming Text Oriented Messaging Protocol, Message Queueing Telemetry transport and other protocols via a plugin.RabbitMQ is written in the Erlang programming language, it offers support for client interfaces and libraries for all major programming languages including Python, NodeJS, Java, PHP etc. Now let’s see how to set up a RabbitMQ Cluster on Ubuntu Server.   Prerequisites We need three Ubuntu 18.04 servers, let the IP and…

Read More

Find files larger than particular Size in Linux

ind files that are bigger than

We may face disk space issues in our production/development/QA systems were multiple applications will be running. So if we need to search for files greater than the particular size. How would we do that? To check manually each and every file size is particularly difficult. Now we will see how to find files bigger or smaller than X size in Linux systems. Find Files Bigger Or Smaller Than X size We can use “find” command to find the files bigger or smaller than the given size. For now, if we…

Read More

Install Sublime Text on Ubuntu

sublime text editor

Sublime is a popular and widely used text editor that supports multiple programming languages. It is a popular text editor between the developers. It includes wide features such as Syntax Highlight, Auto Indentation, File Type Recognition, Sidebar, Macros, Plug-in and Packages that make it easy for working with the codebase. We can install Sublime through two ways in Ubuntu. Through snapd Through PPA Install Sublime through snapd We can install Sublime-text latest version through below command. After some time it will be installed and sublime will be ready to use.…

Read More

Install Postman on Ubuntu 16.04/18.04/19.10/20.04

Postman install ubuntu

Postman is an application which is currently one of the most popular tools used in API development and testing. It helps you manage your APSs in every stage of development from designing and testing to publishing API documentation and monitoring. It is a very user-friendly interface for calling remote API. Prerequisites Make sure you having Sudo privileges while installing this application. If you are running on Ubuntu 16+ or late, including Ubuntu 18+, Ubuntu 19+ and Ubuntu 20+, you don’t need to do anything. Snap is already installed and ready…

Read More

Clear Mysql ibdata1

Hi Techrunnr, this document deals with How to shrink ibdata1 file in /var/lib/mysql/. By default ibdata1 file in /var/lib/mysql/ normally consists of 4 types of data Table Data Table Indexes MVCC (Multi versioning Concurrency Control) Data Table Metadata Follow the below steps to shrink the ibdata1 Take the dump of all the databases Stop mysql service Now we will remove the ibdata1, ib_logfile0, ib_logfile1 Add the below content to the my.cnf file Start the mysql service ibdata1 contains table information, so we have deleted this file, so databases will be…

Read More

Copy s3 bucket contents to another

Hi Techrunnr, this post is regarding copy the contents of s3 bucket to another using aws cli, let’s say we have some contents in bucket1, we want to take daily basis backup to another bucket and we want to maintain a directory structure as month and day basis, so here we go prerequisites: AWS CLI installed AWS Access key and secret key and your account should be able to access both the bucket Login to aws account using below commands: We will create folder with today’s date in the script…

Read More

Install RoboMongo (Robo 3T) on Ubuntu 18.04

robo-3t

Robo3T formerly known as RobMongo is one of best GUI tools for the managing and querying MongoDB database. Follow below steps to install Robo 3T using terminal Step 1: Goto https://robomongo.org/download Step 2: Select Linux and click on download link Step 3: Create robomongo directory using below command Step 4: Move file to /usr/local/bin using below command Step 5: goto robomongo directory using below command Step 6: Untar file Step 7:Execute robo 3t file using below command Step 8: Agree to condition and enter required detail. © 2019, Techrunnr. All…

Read More

Install youtube-dl on Ubuntu 18.04

In this article, we will see how to install youtube-dl in Ubuntu 18.04. What is youtube-dl and features of youtube-dl? youtube-dl is a command-line program to download videos from YouTube. Some of the features of Youtube-dl. Download videos from youtube without interrupted. Extract mp3 from video files. From playlist download all videos. Download only the videos uploaded in the last x days. How to install youtube-dl We can install youtube-dl from apt repository itself. For this, just need to run the below command: Update YouTube-DL We can update youtube-dl to…

Read More

dockerisation of monogdb replica and HA

Hi Techrunnr, this document is related dockerising mongodb with replication setup and HA HA (High availability) refers to improvement of system and app availability by minimising the down time for usual maintenance of system and as well as application and system crash (unplanned). This post specifically talk about the mongoDB replication setup and HA with docker, this is a master-salve architecture Master: The master node can both read and write data. When handling modified data, the op-log will synchronise the updates to all the connected slave nodes. Slave: The slave node…

Read More