My VPS / Cloud / Dedicated Servers hangs/stops responding/stops working ?

My VPS / Cloud / Dedicated Servers hangs/stops responding/stops working ?

When your server you are hosted on stopped working there could be numbers of possible reasons for it. When you feel the website is not working try to refresh the page if it doesn’t resolves the issue try opening it in the other browser and other devices as well. If nothing works out kindly contact the support team they will help you resolve the issue. The server could stop responding when there is too much of resources consumption from the website, The database failure due to foreign commands ran into the server. Numbers of possible cases are studied to overcome this issue.

Problem:  (The problem can be told in many ways, Example of few ways)

  1. My VPS or Cloud or Dedicated server hangs and stops responding?
  2. Due to overload, My server stops responding?
  3. Due to HIGH CPU and high RAM usage, My DB server or Apache / web server stops responding.

The CPU load or system load can shoot up to sky high at any given time for 100s of reasons.  There can be 100s of reasons, why it happens and It can analyse or known once we reboot the server and study the logs of what has happened.

Some of the common reasons, Why server stops responding…

  • Too many requests choke the servers. Example, Your server is configured to server 10,000 requests per hour. All of sudden, If your server receives more than that, then your server struggles to serve all the request and at some point in time, It overloads and stops functioning as expected.  You may get too many hits due to bot or DDOS attack.
  • Overload of DB server.  Due to poor programming or overload of the request as mentioned in the above para, your DB server can stop functioning. Imagine, If your DB server can handle only 1,000 queries per minute and If it receives more than 1,000 like 5,000 queries per minute, then it stops functioning properly.
  • Email server issue. The email server can handle a good amount of Emails per hour. Assume, If your website is compromised or hacked, then generally hackers use your server to send millions of emails per hour. When you send few millions of emails per hour, then Email server consumes more memory and results in the server overload.
  • A genuine increase in traffic: It is possible that your website might get more genuine traffic than what was before. When there is a increase in traffic, then it is advisable to increase the resources.

In all the above scenario, You have to find out the root which causes the problem and fix it. Otherwise, upgrading the resources such as RAM or CPU can be helpful sometimes. When you add more CPU and RAM, then your server gets more resources to handle any request. But, still it is still advisable to find out the root cause and take permanent action.

Soa Technology

Amazon Now re-brands itself as Prime Now, promises 2-hour express delivery

Amazon Now re-brands itself as Prime Now, promises 2-hour express delivery

Amazon India has rebranded its grocery services as Prime Now which promises to provide 2 hours express delivery to its prime members. The Amazon Prime Now app is now available for download on Android and iOS devices. Talking about the launch, Head of Prime Now, Amazon India, Siddharth Nambiar said that they have invested in the customized infrastructure of fulfilment centres (FC) for faster deliveries and chill chains to maintain temperatures at optimum conditions for leafy products.

“On Prime Now, customers can shop for products from our Now store which is fulfilled by Amazon. We have invested in the customized infrastructure of fulfilment centres (FC) for faster deliveries and chill chains to maintain temperatures at optimum conditions for leafy products and dairy products like curd and paneer. We are encouraged by the strong customer response and quantities ordered have grown by 90% monthly since the launch of the NOW store,” he said.

Here is everything new for customers:

– Prime Now will provide exclusive Express 2-hour delivery to Prime members anytime between 6 am to midnight (order as late as 10:00 PM for midnight delivery). Same-day and next-day delivery will remain available for all customers, in convenient 2-hour slots from 6 am to 12 midnight.

– Prime Now, which is an app-only ultrafast service, is available to customers in Bengaluru, Mumbai, New Delhi and Hyderabad catering to the urban family that values convenience.

– It will take orders as late as 10 pm for midnight deliveries.

– This app-based service will give access to more than 10,000 products such as fruits, vegetables, home and kitchen items etc to its costumers.

– The app offers cash back on the first order and this is in addition to the discount offered on various items available on Prime.

– Amazon will deliver items through its store – Now store which offers a range of over 150 perishable grocery items and the items are updated with every season like seasonal fruits.

– In addition to that, the online retailer has partnered with various local and big stores like BigBazaar, HyperCity, Spar. Hence, the customers can now get items from these stores within 2 hours as well.

– Amazon Prime Now will allow the customers to claim a refund on expired or defective products within 10 days of delivery.

Sameer Khetarpal, Director – Category Management (Grocery), Amazon India said that the company is excited about scaling up the segment. He said that the app will also allow the customers to get access to popular Amazon bestsellers.

“We are excited about scaling up our grocery experience with a significantly expanded selection and new delivery services with Prime Now, an Ultrafast App, for ‘delivery in hours’. Customers can access fresh quality of fruits & vegetables, staples, and also get access to popular Amazon bestsellers. With new delivery hours, and over 10,000 products fulfilled by Amazon, customers can look forward to a fast, convenient and trustworthy shopping experience on Prime Now,” Khetarpal said.

Source by financialexpress

Setting up cron jobs with cPanel

Setting up cron jobs with cPanel

What is a cron?

A cron is a service that allows a user to automatically execute a script at a specific time.

For example, you can set a particular PHP script to be automatically executed everyday at midnight.

Set up cron jobs through cPanel using this procedure:

  1. Log on to your cPanel Interface.
  2. Go to ”Advanced’ section.
  3. Click on “Cron Jobs”.
  4. Select the specific time from the lists provided.
  5. You should enter the command to run in the “Command” field.

Note:

You should make sure to enter the proper command and the full path to the file.

(for eg.: /usr/bin/php /home/user/public_html/cron.php).

Check the relevant screen captures:

How to test Cron Job(Cron job testing)

How to test Cron Job(Cron job testing)

What is Cron Job ?

The software utility Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.

Below are the few points/Pre-made Test cases for the Cron Job Testing:-

  1. Verify if It is scheduled correctly – By going here http://corntab.com/.
  2. Mock the Cron time by 1-2 minutes by changing it for quick testing (if it’s long for hour/day long). – High
  3. Ask the devs to create a shortcut for it. In the server or any other way to directly run it by you so that you can test it when you need.(saves time)
  4. Ask dev to add the logs for monitor purpose and monitor it while testing.
    Use below command for logs.
    * * * * * /path/script.sh &> /path/script.log or
    tail -f /var/log/cron
  5. Do testing by doing changing things like we do in CRUD(Not always, Crud means update/delete etc whichever is relevant) and verify results. – High
  6. Break something the job relies on upon and schedule it to run again in a few minutes – Verify the results.
  7. After deployment – Validate it with real data also. – High
  8. Keep system time and user system time in mind while testing CRON’s as scheduling is by server GMT time usually.
  9. Negative scenario: What if CRON is stopped the midway execution, any impacts it will have?
  10. Negative – Discuss with dev if there is any possibility of the same Cron getting run multiple times.
  11. Negative – Discuss with dev if its fails to the job – What is the risk/ solution for it(did we get the mail if it fails ?)
  12. Test for scenarios which shouldn’t get affected by Cron job(e.g. a other Cron should not affect other cron)

Sharing ATM PIN with your spouse could cost you heavily

Sharing ATM PIN with your spouse could cost you heavily

Most of us wouldn’t think twice about handing over our ATM-card to our spouse to withdraw money for us.

But it cost a Bengaluru couple three years of running around, financial losses and mental peace to learn that they shouldn’t.

It happened because they didn’t pay attention to a basic rule: never share your ATM PIN with anyone. Here’s what happened.

Case: Here’s what happened

On November 14, 2013, days after she had given birth, Marathahalli resident Vandana gave her SBI debit-card to her husband Rajesh to withdraw Rs. 25,000.

Rajesh swiped the card, the amount was debited, but cash wasn’t released.

He immediately contacted customer-care, who told him it was a glitch and that the money would be reverted to the account in 24 hours, but it didn’t.

Bank: Initially, bank claimed the transaction was successful and correct

Rajesh then approached the bank’s Helicopter Division branch to lodge a complaint. To their surprise, SBI concluded they had received the money and closed the case.

With much difficulty, they secured the CCTV footage which showed money wasn’t dispensed.

They also obtained a cash verification report of the ATM for that day, which showed excess of Rs. 25,000 in the machine.

Proof: Couple approaches consumer forum, demands a refund from SBI

Once again, they contacted the bank. This time, an investigation committee noted that Vandana, the cardholder, wasn’t seen in the CCTV footage.

Despite their pleas, the ombudsman ruled, ‘PIN shared, case closed.’

They finally approached the Bangalore IVth Additional District Consumer Disputes Redressal Forum on October 21, 2014.

Justifying their PIN-sharing, Vandana said she had just given birth and couldn’t go out of home.

Verdict: After three long years, forum rules in the bank’s favor

The case went on for 3.5 years. Vandana demanded a refund, while SBI cited its ‘non-transferable’ rule and refused, saying the ATM user wasn’t the account-holder.

Sharing of ATM PIN with anyone is a violation, it insisted.

It also produced documents that showed the transaction was successful and technically correct.

On May 29, the consumer forum finally ruled in the favor of the bank.

Options: So what do I do in case of emergencies?

Almost any husband and wife will unavoidably need to take the other’s help in transacting from their own account, maybe during sickness or some kind of emergency.

There are other ways to do it. You can give your spouse a self-cheque, or a letter authorizing a withdrawal, so they can legally withdraw money from your account.

Another option is to open a joint account.

Source by yahoo..

Forty or Fourty: What’s the Difference?

Forty or Fourty: What’s the Difference?

It’s a common complaint among people who are learning English that the language lacks consistency. English was spoken in both the Old and New Worlds at a time when rapid communication across long distances was impossible, which has led to a differing and sometimes contradictory set of conventions.

The same word can be spelled differently in American and British English, for instance. This duality can be confusing, but not every word has multiple spellings.

Many people aren’t sure whether to write the number 40 as forty or fourty. It’s a common misconception that fourty is conventional in British English, while forty is the Americanized version.

However, only one of these spellings is correct, regardless of region.

What is the Difference Between Forty and Fourty?

How do you spell 40? In this article, I’ll explain the difference between these two words, and reveal whether forty or fourty is the correct spelling. I’ll use the correct term in a sentence and tell you an easy trick to remember the difference.

When to Use Forty

commonly confused English words forty fourty

Contrary to popular belief, there is only one correct spelling of the number 40.

Forty is the proper way to spell the number, and fourty is always incorrect. It’s easy to see why this would be confusing, since the base number is four, and the U isn’t dropped from other numbers like fourteen or even forty-four. While there are British and American spellings of some words, forty is not one of them.

The following sentences are correct:

  • Jon drove forty miles per hour in a thirty-five mile per hour zone.
  • Amanda ate forty hot dogs.
  • Melinda is forty-six years old.
  • The site has about forty full-time employees, mostly in New York, where the publication is based, and so far they have worked with more than nine hundred athletes, Robertson told me. –The New Yorker

When to Use Fourty

You should never use fourty. It is an incorrect spelling of forty. Fourty is not correct in British or American English, and it appears to have never been the correct spelling.

When writing out the number 40, forty is the only correct option. As you can see from the following chart, if fourty was ever used in proper English, it must have been well before 1800:

This chart is not exhaustive of all written texts, as it only reflects data from books written in English since 1800, and no other print sources. However, it is certainly thorough enough to see that the use of fourty to signify the number 40 has not been nonexistent since at least the beginning of the 19th century.

Although fourty is universally rejected, it still finds its way into the writing of those who should know better.

  • Fourty-four states, plus the District of Columbia and the U.S. Virgin Islands, can participate in Mega Millions. –Staten Island Advance

Fourty vs. Forty – Trick to Remember the Difference

forty-versus-fourty

Forty dollars or fourty dollars? Forty is the written form of the number 40. Fourty is a spelling error for Americans and Britons alike.

You can remember to always use forty by noticing that forty contains the word for, and forty is correct for everyone. Fourty is never a correct spelling.

Summary: Forty vs. Fourty

Is it forty or fourty? While there are some words in English that have multiple spellings, forty isn’t one of them.

Fourty is not a word, and forty is the only way to spell the written form of the number 40.

The decision to use fourty or forty is therefore an easy one. Use the memory trick “forty is for everyone” to remember the proper spelling, or you can always refer back to this article.

Soa Technology

SDNS AND NFV ARE COMPLEMENTARY AND CORE COMPONENTS OF MODERNIZED NETWORKS

SDNS AND NFV ARE COMPLEMENTARY AND CORE COMPONENTS OF MODERNIZED NETWORKS

Software-defined networking and network functions virtualization both untie tasks and functions from hardware and provide agility, one for the network itself, the other for network services..

The terms software defined networking (SDN) and network functions virtualization (NFV) are often used interchangeably, which is incorrect.  In a sense, the two are tied together as companies start using NFV as part of their SDN plans but that doesn’t have to be the case.

Enterprises could maintain their current network architecture and shift to NFV or they could roll out an SDN and never leverage the benefits of NFV, so it’s important to understand what each is and the benefits of both.

What is software-defined Networking

SDNs are a fundamentally different way to think about networks.  Technically, SDNs can be defined as the separation of the management, control and data-forwarding planes of networks.  Many people, including technical individuals read that definition and say, “So what?”, but the separation of these planes has a profound impact on networks and enables things that have never been done before.

Historically, management, control and data forwarding were tightly coupled together. This meant each network device such as a router or a switch needed to be configured independently, typically through a cryptic command line interface (CLI), which makes operating a network challenging.

Any time a change needed to be made to the network, even a small one, each network device had to be reconfigured independently.  For small networks, this is an annoyance.  For medium and large networks, the manual nature of the work could bring things to a crawl.  In fact, ZK Research conducted a study in 2017 and found that in large enterprises it took an average of four months to implement a change network wide.

This might have been fine a decade ago when businesses weren’t as dependent on their networks as they are today, and network changes were only made infrequently. In today’s digital era, companies compete on speed, and four months is far too slow for the network to keep up with the business.

SOFTWARE

What is software-defined networking (SDN)?  (2:37)

SDNs decouple control, management and data forwarding

By extracting the control and management planes from the underlying hardware, they can be abstracted into a software layer that is independent of the hardware and centralized via a controller.  The controller can be a physical device, virtualized or deployed in the cloud.  This model enables network engineers to make a change in a GUI – instead of using CLI – and then propagating it across the entire network with a single click of the mouse.  Network changes can be done at the speed the business requires.

SDNs improve security

In addition to speed and agility, another benefit of SDNs is improved security using micro-segmentation.  Traditional networks use virtual LANs (VLANs) and access control lists (ACLs) for coarse-grained segmentation.  SDNs enable the network to be partitioned at a much more granular or fine-grained level. Also, because the segmentation operates in an overlay network, devices can be assigned to segments by policy. If the device moves, the policy follows without automatically.

SDN enables programmable networks

Another benefit of SDNs is the network becomes programmable.  SDN controllers expose northbound APIs that application developers can use to interface with the network so applications can dynamically configure it to reserve bandwidth, apply security or whatever else the apps may require. The programmability also enables networks to be orchestrateable through the use of common orchestration tools like Chef, Puppet and Ansible.  This means networks can be better aligned with DevOps initiatives.

SDNs work with most hardware

Also, with SDNs the network becomes hardware agnostic where the overlay controllers can work with a wide range of hardware, include white-box switches.  Most customers choose a turnkey solution that includes hardware and software from the same vendor, but SDNs do present the opportunity to move away from that model, if a business chooses.

One of the more underappreciated benefits of SDN is that it increases network uptime.  ZK Research has found that the largest cause of downtime, 35%, is from configuration errors related to human errors.  This happens because of the manual nature of a CLI and the fact that tasks have to be repeated over and over.  SDNs automate the configuration, which can eliminate self-inflicted downtime. Offloading these tasks also lets network engineers focus on more strategic initiatives instead of spending most of their day “keeping the lights on.”

What is network functions virtualization (NFV)?

An SDN is a critical step on the path to a modernized network, but many services, such as routing, WAN optimization and security are still tied to the underlying hardware.  As the name suggests, network functions virtualization solves this problem by decoupling the network function from the hardware, virtualizing it allowing it to be run in a virtual machine on any compute platform a business chooses.

NFV is similar but different from server virtualization

NFV is similar to the transition that the server industry experienced when server virtualization went mainstream.  With server virtualization, applications ran as virtual workloads in software, which lowered cost and increased hardware utilization. With NFV, these benefits can be applied to the network as network services running as virtual workloads.

To date, the majority of NFV deployments have been carried out by service providers, but recently NFV has become a priority for digital companies.  A 2017 study by ZK Research found that 61% of respondents are researching (29%), testing (13%), planning to deploy (10%) or have deployed (9%) NFV; NFV is coming quickly.

While there are similarities between server virtualization and NFV, there is a major difference. The primary use case for server virtualization has been to consolidate servers in a data center. NFV can be used in a data center, but it’s sweet spot is bringing network services to other points in the network including the branch and the cloud where there are no local engineers.

NFV increases service agility

For example, a business that wants to take advantage of local internet breakout where branch workers can access internet services – such as accessing SaaS apps directly instead of going through a central hub – could leverage NFV to secure the traffic. Typically, this would require a physical firewall (or a pair of them for redundancy) to be deployed in every branch office with local internet breakout.  This can be a very expensive undertaking given the cost of next-generation firewalls.  Also, it could take months to purchase the firewalls and have an engineer travel to the branch and deploy them.  With NFV, the firewall functionality can be virtualized and “spun up” almost instantly, making them fast and easy to deploy.

Today, competitive advantage is based on a company’s ability to be agile, adapt to changes and make rapid transitions to capture new business opportunities. Virtualization and containers have increased compute and application agility but the network has remained relatively static. The long lead times to deploy, change and optimize the network should be considered the hidden killer of companies as that can hold companies back from implementing digital initiatives.

Software defined networks increase the agility of the network ensuring it is in alignment with the rest of the business.  Network functions virtualization is a complimentary technology that makes network services agile.  The two together are core building blocks to modernize corporate networks.

This story, “SDNs and NFV are complementary and core components of modernized networks” was originally published by Network World.

APPLE BANS CRYPTOCURRENCY MINING APPS ON IOS TO PROTECT MOBILE USERS

APPLE BANS CRYPTOCURRENCY MINING APPS ON IOS TO PROTECT MOBILE USERS

Apple has created new rules for app developers that ban the creation of cryptocurrency mining services on mobile devices.

Using an iPad or iPhone to mine bitcoin or other cryptocurrencies would be hard to do, as the CPU power available to complete the task would be a drop in the bucket compared to what’s needed.

But using a portion of the CPU power from thousands of iPads or iPhones to mine cryptocurrency makes more sense – and that’s exactly what some malware has been doing.

Apple is now moving to stop the practice.

The company released several rules changes for developers at WWDC last week, but rolled out the modifications with no fanfare. This week, however, Apple Insider discovered a section of the company’s developer guidelines under the heading Hardware Compatibility specific to the malware issue; it states that any apps, “including third party advertisements displayed within them, may not run unrelated background processes, such as cryptocurrency mining.”

Though some might question the Apple edict, the decision still makes sense, according to Martha Bennett, a principal analyst at Forrester Research.

“Just like with all the cryptocurrency mining utilities you get for PCs (in the shape of apps or browser plug-ins, most of which are malware), they thrash your CPU, and if you’re running on battery, which you almost invariably are on a mobile device, they drain your battery,” Bennett said via email. “Plus, Apple won’t want to be associated with all the shady stuff that’s going on in relation to cryptocurrencies.”

Apple may not be the only taking that tack. While there has been no similar change yet on the Android side of things, Google is keeping the door open to the same kind of move. The company updates its user policies on a monthly basis, a spokesperson said, when asked about the possibility of a cryptocurrency mining ban.

The problem with malware that siphons CPU cycles from desktops and mobile devices for the purpose of cryptocurrency mining is relatively new but growing quickly. For example, cryptocurrency mining service Coinhive has been cited as one of the top offenders for spreading malware for its own purposes.

Coinhive uses a small piece of JavaScript that installs on websites and in advertisements; the code then hijacks a portion of the compute power of any device using a browser to visit that site. Essentially, it unwittingly enlists a device to mine Monero cryptocurrency. The practice is known as cryptojacking.

Not surprisingly, the rise of “cryptomining” malware over the past year seems to reflect the rise of cryptocurrency itself, according to antivirus vendor Trend Micro.

Trend Micro’s research data showed cryptocurrency mining has overtaken ransomware in North America. The first quarter of 2018 saw information theft malware being the most detected event in end user devices, with cryptocurrency mining close behind, a report stated.

Cryptojacking malware cryptocurrency bitcoin
Cryptojacking malware was second only to information theft malware.

“Cryptocurrency mining presents a more furtive and passive alternative to ransomware,” a Trend Micro spokesperson wrote in an email reply. “Due to the nature of cryptocurrency mining, a single infection might not provide cybercriminals as much profit as they would from other types of malware. However, a cryptocurrency miner’s stealth and longer infection time mean less work on the attacker’s end.”

Cryptocurrencies are created through a process known as Proof of Work(PoW). PoW algorithms force computers to expend CPU power to solve complex cryptographic-based equations before they’re authorized to add data to a blockchain-based, distributed ledger; those computer nodes that complete the equations the fastest are rewarded with a portion of digital coins, such as bitcoin. The process of earning cryptocurrency through PoW is known as “mining” – as in mining bitcoin.

Garnering valuable cryptocurrencies has become so popular that people, groups and even companies have set up mining rigs and data centers with thousands of servers for the express purpose of generating bitcoin or other cryptocurrencies.

The purchase price of GPUs and ASICs has shot up as a result and some nations and cities have even restricted mining operations because of the amount of electrical power they’re using.

For a single iPhone or iPad, the CPU drain from mining could be significant, even as part of a hive mining cryptocurrencies.

“I’m not sure many users would be sophisticated enough to understand that mining takes up all of the resources on the device. And if it’s a third party installing it on devices in secret, that’s even worse for the end user and the ramifications it could have with Apple support, not to mention all the negative social media posts,” said Jack Gold, principal analyst with J. Gold Associates.

“It makes sense to me that Apple be proactive and make sure this doesn’t become a real problem,” he said. “It will be interesting to see if others go down the same path.”

This story, “Apple bans cryptocurrency mining apps on iOS to protect mobile users” was originally published by Computerworld.

WINDOWS SERVER 2019 EMBRACES SDN

WINDOWS SERVER 2019 EMBRACES SDN

Software-defined networking in Windows Server 2019 includes virtual network peering and encryption, auditing, and IPv6 support.

When Windows Server 2019 is released this fall, the updates will include features that enterprises can use to leverage software-defined networking (SDN).

SDN for Windows Server 2019 has a number of components that have attracted the attention of early adopters including security and compliance, disaster recovery and cusiness continuity, and multi-cloud and hybrid-cloud.

Virtual-network peering

The new virtual networking peering functionality in Windows Server 2019 allows enterprises to peer their own virtual networks in the same cloud region through the backbone network. This provides the ability for virtual networks to appear as a single network.

Fundamental stretched networks have been around for years and have provided organizations the ability to put server, application and database nodes in different sites. However, the challenge has always been the IP addressing of the nodes in opposing sites. When there are only two static sites in a traditional wide area network, the IP scheme was relatively static. You knew the subnet and addressing of Site A and Site B.

However, in the public cloud and multi-cloud world – where your target devices may actually shift between racks, cages, datacenters, regions or even hosting providers – having addresses that may change based on failover, maintenance, elasticity changes, or network changes creates a problem. Network administrators have already  spent and will drastically increase the amount of time they spend addressing, readdressing, updating device tables, etc to keep up with the dynamic movement of systems.

With Vnet Peering, while the external location and fabric that the host and applications systems are running in may drastically change, the virtual network remains consistent.  No need to change source and target addresses within the application, no need for Web and Database pairs to change settings.

Virtual-network encryption

Another significant improvement in Windows Server 2019 is the ability for virtual-network traffic to be encrypted between virtual machines. Traffic encryption is not new to the industry, however having the encryption built in to the operating system as the basis of hypervisor communications, server communications and application communications provides both flexibility and that in the past was frequently done at the application layer.

Now with Vnet encryption, entire subnet communications between host servers can be protected, and all network traffic within that network is automatically encrypted. For organizations looking to ensure communications between a Web server and a database server is encrypted, Vnet encryption in Windows Server 2019 can be enabled. Since the communications is at the network/subnet level, if additional Web frontends and backend databases needed to be added, all those servers join the same encrypted communication stream, offloading the secured communications away from the application itself, improving performance and efficiency.

Some of this protection can be accomplished by isolating servers and systems on the same VLAN, but organizations can more simply and quickly encrypt the communications between systems as a method of secured communications and data protection. As organizations look to enable protection through software defined controls and eliminate complexities, configurations leveraging virtual network encryption greatly enhance security in a simplified manner.

How to zip the directory in linux with command line

In this tutorial we will learn,how to zip the directory in linux with command line.Zip is a compression and file packaging utility for Linux,Unix,Windows and various Operating system. The zip helps to compress and reduce the size of file and directory.To zip a directory,first of all we will check ,do we have zip command installed in Linux system.

Note: For more detailed zip examples with command line, read out this post (How to zip directory in linux explained with examples).

The below command will help to find is zip installed or not.

# which zip   (It will show the absolute path of zip)

In CentOS

# rpm -q zip

In Debian or Ubuntu

$ sudo dpkg -l zip

If you find it is not installed in system then install with given below command.

In CentOS or Red hat
# yum install zip

In Debian or Ubuntu
$ sudo apt-get install zip

After confirmation of installed zip package,now we will zip or compress the directory in Linux system.
Use the given below command.

zip -r GiveAnyName.zip  /path/of/Directory

for eg.
 We have a backup directory in /root/ (i.e /root/backup)

zip -r backup.zip /root/backup

The command will compress the directory with extension .zip .
In above given eg. the compressed file name would be backup.zip

zip linux command exclude folder

zip -r myarchive.zip dir1 -x dir1/ignoreDir1/**\* dir1/ignoreDir2/**\*