While working with the archive files, sometimes you are required to list archive file contents instead of extract an archive file. Using this you can see the files available in an archive file. Read another tutorial with 18 Linux tar command examples List Archive File Contents (Quick Commands) The -t switch is used for list content of a tarball file without extract. Below is the quick commands used to list .tar, .tar.gz, .tar.bz2 and .tar.xz file contents. tar -tvf archive.tar tar -ztvf archive.tar.gz tar -jtvf archive.tar.bz2 tar -Jtvf archive.tar.xz List .tar File Content Use -t switch with tar command to…
Author: Rahul
Question – How to Get Current Date Time with PHP? How do I get current date and time in PHP script? PHP Script to get current date and time in Y-m-d H:i:s format? You can use date() function to get current Date and Time in any PHP version. A DateTime PHP class is also available in PHP > 5.2 to get Date and Time. Also find the example to get date and time in JavaScript PHP Date and Time Print the current date and time using date() function. It will use the default timezone configured in php.ini.
1 2 3 | <?php echo date('Y-m-d H:i:s'); ?> |
Print the…
The Python subprocess module allows to spawn of new processes, and execute external commands or scripts from the Python scripts. You can install the latest version of Python using these tutorials. Also, there is a number of IDE available for Python. Like Install PyCharm Python IDE on Ubuntu systems. Python Scrpt to Call System Command Let’s create your first program to list all files available in the current directory. You can add any number of command-line parameters with the comm (,) separated.
1 2 3 4 | #!/usr/bin/python3 import subprocess subprocess.call(["ls", "-l"]) |
Where- import statement is used to load the subprocess module form the Python standard library call is…
Nagios is the most popular monitoring server for infrastructure monitoring. In the series of Nagios monitoring tutorials, this tutorial will help you to monitor Memory, CPU, and Disk on a remote Linux system using Nagios and NRPE. I assume you have a running Nagios server on your network. Prerequisites You have installed the NRPE client on your Linux system. Use the following commands to install NRPE on your system or visit our tutorials for the NRPE installation on Debian based systems and Redhat based systems. Ubuntu and Debian based systems: sudo apt install nagios-nrpe-server Redhat, CentOS systems: sudo dnf install…
VPN or Virtual Private Network is a group of computers connected to the private network over the public network (Internet). These days security is the primary concern for everyone and it’s more required while working over the public network. Like you have a group of computers in a remote location. Now you need to access those computers as a LAN network in your system. Also, you need all data should be encrypted during transfer between computers. The solution is a VPN. You can use a VPN network to connect two remote location systems with each other as they are on…
Sphinx is a simple, relevance and open source full-text search server. It is written in C++ programming language and works with Linux and other popular operating systems. This tutorial will help you to install and configure Sphinx full-text search server on Ubuntu 16.04, 14.04 LTS operating systems. Prerequisites Before you begin this guide, you must have the followings. Ubuntu server with sudo access Pre installed MySQL server Step 1 — Install Sphinx Installing Sphinx on Ubuntu is easy because it’s in the native package repository. Install it using the apt-get package manager on your Ubuntu system. sudo add-apt-repository ppa:builds/sphinxsearch-rel22 sudo…
Swift is a safe, fast, expressive general-purpose programming language build for the software design patterns. It is best for the systems programming, to mobile and desktop applications. Swift provides a large number of features that make programming easier while giving the developer the control needed in a true systems programming language. This tutorial will help you to install swift programming language on your Ubuntu and Debian system. Step 1 – Prerequisites Login to your Ubuntu system using SSH (Shell) access. Now install the required dependencies for swift installation on your system. sudo apt-get install clang libicu-dev On a fresh Ubuntu…
Question – How to reset Joomla admin password via SQL query? How to reset Joomla admin password using phpMyAdmin? How to Reset Joomla forgotten password with SQL query? How to find Joomla default admin password? If you have forgotten your Joomla admin password or due to any reason, you are not able to login to Joomla with admin user. You can simply check the active admin user using SQL query and reset the password with simple SQL query. After updating password with any of below method your Joomla administrator user password will be secret. Reset Joomla Admin Password via SQL…
This tutorial will help you to install and configure Joomla CMS on your Debian based systems. Step 1 – Setup LAMP Server First of all, configure the LAMP server on your system. Execute the following commands from the system terminal for the installation of a LAMP server. First, add the required PPA repository in your system. sudo apt-get install -y python-software-properties sudo apt add-repository ppa:ondrej/php -y Now install the packages for Apache, PHP, and MySQL using the below commands. sudo apt-get install apache2 apache2-data apache2-utils sudo apt-get install php php-mcrypt php-curl php-mysql php-gd php-cli php-json php-xml php-zip libapache2-mod-php sudo apt-get…
Question – How to Disable Strict SQL Mode in MySQL? How do I disable MySQL strict mode? How to set sql_mode option globally to disable strict mode my MySQL server? Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. This can be for any reason like if strict mode is enabled, division by zero produces an error. Date as ‘0000-00-00’ is not permitted and produce an error. This tutorial will help you for disabling the strict SQL mode in MySQL server 5.7 or later versions. Disable Strict SQL Mode You can…