Restore a Deleted File in Linux

We will learn how to restore delete file in linux

Foremost is not available in any of the CentOS/RHEL repositories, so we’ll need to install it using RPM.

For centos 7 use following command

yum install https://forensics.cert.org/centos/cert/7/x86_64//foremost-1.5.7-13.1.el7.x86_64.rpm -y

For Centos 6 use following command

yum install https://forensics.cert.org/centos/cert/6/x86_64//foremost-1.5.7-13.1.el6.x86_64.rpm -y

Once formost installed let’s try to delete one file and recover it.

Get details of file midnight.jpg which we will delete and recover

file midnight.jpg
md5sum midnight.jpg

Now delete file

rm -f midnight.jpg

Restore a Deleted File

mkdir /root/recover
foremost -i /dev/sda1 -t jpg -o /root/recover/

Here -i used to specify disk and -t used to define type of file which we want to restore.
This command will find any .jpg files in /dev/sda1 and restore them into the /root/restored/ directory, as long as the space they are using on disk has not yet been overwritten by anything else.
Now go to /root/restored/jpg folder and execute md5sum 17602156.jpg and you will find md5 hash of this file is exactly same as that of midnight.jpg.

Types of Webhosting

Types of webhosting.

There are mainly two types of web hosting 1: Managed hosting 2: Un-Managed hosting.

Managed hosting: Here, web hosting provider provide complete support. Even if client send email and ask them to create email account they will create email account for him.

Creating email account is very simple task client just need to login his cPanel account and Go to Email section and create account with few clicks. In un-manage hosting web hosting provider will reply you and ask to create it yourself 🙂

What are pros and cons of Managed hosting

1: Just email or initiate live chat and ask them to perform any smallest and easiest task.

2: Client can blame for any issue like downtime, site hacked or slow loading speed.

3: Client can get assistance to configure and install 3rd party applications like WordPress ,Joomla or any application which need manual installation.

Cons:

1: Only one so far I noticed you need to pay almost double price every month even if you are managing site/server yourself.

Un-managed hosting pros.

1: Client get hosting at very low cost.

Cons:

1: Client need to take care of his hosting.

2: Maintain backups, Install and configure applications.

3: Client need to learn all technical stuffs ie. optimizing server, services, applications he has installed.

Suggestion: If client want to run wordpress site and he is non-technical guy. Then he shall go for managed hosting once he learn how to download backup and upgrade applications and maintain his site then he can shift to un-managed hosting and save money.

cPanel web hosting

Featured

cPanel Webhosting.

cPanel is most user friendly panel in web hosting. Most of the shared hosting provider , reseller, dedicated & cloud server use this panel to manage client’s site or their own site. Most important feature of cPanel is it provide lots of features like. Create email accounts, setting filters, forwarders, FTP accounts , Password protect folders etc…

For hosting provider it is very important to manage and monitor activities going on their server especially on shared server. Main advantage of shared hosting server is you can host lots of sites and oversell resources.

What is overselling. Suppose you have server with 16 CPUs, 300 GB disk, 10 TB (10240 GB) bandwidth and 32 GB RAM. Such server will cost provide around $200 per month. Here hosting provider will provide client basic plan like: 10 GB , and 100 GB bandwidth for $2. He would able to host such 500 Clients on his cPanel server because most of the client ie. 90% will not use even 10 GB bandwidth and 1 GB disk space while hosting a site. Also most of sites will have very low traffic in such case they will not be using even 1% of server’s total resources.

In this way shared hosting server would able to make $1000 per server costing him $200 including cPanel license.

I will write few more post about Web hosting business. Feel free to raise any question either technical or non-technical in comment or contact us form. I would glad to assist free of cost.