Skip to main content

Compress File Into Zip Format In Linux Using Terminal

- Launch Terminal

- Check if "tar" package was installed in your system if not Please installed it before proceed next step

- Type the following command in Terminal

tar  -czvf  filename.zip  /pathfordirectory

-c : Create an Archive

-z : Compress an Archive with Zip File Format ( Can Also Format as tar.gz )

-v : This is an Optional. It displays the process of Archive in Terminal. It's also Called as "Verbose".

-f : Allows to Specify File Name for the Archive 

Comments

Popular posts from this blog

Install and Configure Apache in Ubuntu 14.04

Easy way to install and configure "Apache" server in Ubuntu 14.04 1.Install apache:              sudo apt-get install apache2 2. In /etc/apache2/sites-available/000-default.conf :                 ScriptAlias /cgi-bin/ /var/cgi-bin/                <Directory "/var/cgi-bin">                         AllowOverride None                         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                     ...

PHP Session Clean

I was getting the following error when trying to browse the icingaweb2 website in the browser Fatal error: Uncaught ErrorException: Uncaught ErrorException: session_name(): Cannot change session name when session is active in /usr/share/php/Icinga/Web/Session/PhpSession.php:97 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'session_name():...', '/usr/share/php/...', 97, Array) #1 /usr/share/php/Icinga/Web/Session/PhpSession.php(97): session_name('Icingaweb2') #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(152): Icinga\Web\Session\PhpSession->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(540): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(490): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionCont...

Login as NAGIOS user in Terminal

I have written icinga configuration file for some servers to monitoring it. In that, some custom scripts are running with SSH command to monitor the Server status. Everything goes fine till when did shut down the server and launch the same server ( same hostname ) with different hardware due to Memory problem. Note : Memory problem - Sometimes, We need better RAM and Harddisk to handle the traffic when server started to get more request from the Client.  In this moment, the icinga custom scripts and inbuild scripts that related to the server hostname are started to throw the error message that can't connect to server using SSH : SSH Failed ( Same host name. But different hardware ). Because, My monitor server has Old server SSH Key in Known_Hosts for hostname. But, My monitoring server was trying to connect to New Server with Old server SSH Key from Known_Hosts. To avoid this problem, We need to remove Old Server SSH Key belong with Hostname from Known_Hosts...